|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-08-06 09:41 UTC] jack at mobil dot cz
The following piece of code doesn't work:
<?
define ('A', 20);
class B
{
var $a = array(A => 10);
}
$b = new B();
var_dump($b);
?>
It produces:
object(b)(1) {
["a"]=>
array(1) {
["A"]=>
int(10)
}
}
which is unexpected (at least for me).
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Seems to work with PHP 4.1.0RC1: object(b)(1) { ["a"]=> array(1) { [20]=> int(10) } }