影响 PHP 行为的扩展
在线手册:中文  英文

PHP 字节码编译器


影响 PHP 行为的扩展
在线手册:中文  英文

用户评论:

rustushki (2010-12-29 10:05:00)

It looks like as of bcompiler 0.9.3 geoff's code above works correctly with the output:
static
construct
testOut

geoff at spacevs dot com (2010-04-08 03:08:32)

static vars on classes do not work with bcompiler, eg.

<?PHP
        
class testClass {
                static public 
$i;

                static public function 
testStatic() {
                        echo 
"static\n";
                        
testClass::$i = new testClass();
                }

                public function 
__construct() {
                        echo 
"construct\n";
                }

                public function 
testOut() {
                        echo 
"testOut\n";
                }
        }

        
testClass::testStatic();
        
testClass::$i->testOut();
?>

the call to "testOut" will silently fail.

易百教程