PHP variable scope question

According to the PHP manual $a should be available to b.inc in the following code segment:\[code\]<?php$a = 1;include 'b.inc';?>\[/code\]However when I try to do the same when calling a static method, $a seems to be out of scope. \[code\]class foo { public static function bar() { $a = 1; include('b.inc'); }}foo::bar();\[/code\]Am I misunderstanding something?EDIT: Okay, I'm an idiot, everybody. I was using a wrapper function for the include -- to fill in the include path. This took the variable out of scope. Thanks for the help.
 
Back
Top