xref: /PHP-5.6/Zend/tests/bug35509.phpt (revision 610c7fbe)
1--TEST--
2Bug #35509 (string constant as array key has different behavior inside object)
3--FILE--
4<?php
5class 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
19define( "normalConstant", '01' );
20$normalArray = array( normalConstant => 'value' );
21print_r($normalArray);
22?>
23--EXPECT--
24Array
25(
26    [01] => value
27)
28Array
29(
30    [01] => value
31)
32