Report some strange behavior when use eaccelerator

20 views
Skip to first unread message

xueyu

unread,
Jun 14, 2010, 12:53:51 PM6/14/10
to eaccelerator
Environment:

CentOS 5.5 / php 5.3.1 (fastcgi with php-fpm) / eaccelerator
0.9.6.1 ( the same problem with 0.9.6 )

code :

<?php

class A{
public static $filter = array(
'a' => 'abc'
);
}

class B{
public static $filter = array(
'b' => 'def'
);
}

$c = array(
'a' => A::$filter['a'],
'b' => B::$filter['b']
);

var_dump($c);

?>

output:
array(2) {
["a"]=>
string(3) "abc"
["b"]=>
NULL
}
------------------------------------------------

then I make the eaccelerator disabled /*php.ini eaccelerator.enable =
"0")*/
the above code work well.
array(2) {
["a"]=>
string(3) "abc"
["b"]=>
string(3) "def"
}

if I change the code like below, and make the eaccelerator enable, the
code work well too.


<?php

class A{
public static $filter = array(
'a' => 'abc'
);
}

class B{
public static $filter = array(
'b' => 'def'
);
}

$c = array(
'a' => A::$filter['a'],
'b' => B::&$filter['b']
);

var_dump($c);

?>

Thanks .....
Reply all
Reply to author
Forward
0 new messages