Annotation of embedaddon/php/Zend/tests/bug35509.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #35509 (string constant as array key has different behavior inside object)
3: --FILE--
4: <?php
5: class mytest
6: {
7: const classConstant = '01';
8:
9: private $classArray = array( mytest::classConstant => 'value' );
10:
11: public function __construct()
12: {
13: print_r($this->classArray);
14: }
15: }
16:
17: $classtest = new mytest();
18:
19: define( "normalConstant", '01' );
20: $normalArray = array( normalConstant => 'value' );
21: print_r($normalArray);
22: ?>
23: --EXPECT--
24: Array
25: (
26: [01] => value
27: )
28: Array
29: (
30: [01] => value
31: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>