#22145 [Com]: class static variable can't be an array
| From: | mickael dot bailly at free dot fr | Date: | Mon, 10 Feb 2003 10:16:35 +0000 |
| Subject: | #22145 [Com]: class static variable can't be an array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32635@lists.php.net to get a copy of this message | ||
ID: 22145
Comment by: mickael.bailly@free.fr
Reported By: mickael.bailly@free.fr
Status: Open
Bug Type: Zend Engine 2 problem
Operating System: Linux
PHP Version: 5CVS-2003-02-10 (dev)
New Comment:
Note that this code works:
<?PHP
class test2 {
public static $foo = 'ok';
}
test2::$foo = array();
echo "test2::\$foo ? ";
print_r(test2::$foo);
echo "\n";
?>
Previous Comments:
------------------------------------------------------------------------
[2003-02-10 04:14:25] mickael.bailly@free.fr
here is a script that reproduce the problem (tested with
2002/02/10 cvs):
<?PHP
class test {
public static $foo = 'ok!';
}
echo "test::\$foo ? ";
print_r(test::$foo);
echo "\n";
class test2 {
public static $foo = array();
}
echo "test2::\$foo ? ";
print_r(test2::$foo);
echo "\n";
?>
that outputs:
test::$foo ? ok!
test2::$foo ? Segmentation fault
PHP configure line:
./configure --prefix=/usr/local/php2
--with-apxs=/usr/local/apache_php2/bin/apxs
--with-mysql=/usr/local/mysql
tested with PHP CLI.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22145&edit=1