bug66015.phpt 454 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Bug #66015 (wrong array indexing in class's static property)
  3. --FILE--
  4. <?php
  5. class Test
  6. {
  7. const FIRST = 1;
  8. const SECOND = 2;
  9. const THIRD = 3;
  10. protected static $array = [
  11. self::FIRST => 'first',
  12. 'second',
  13. 'third',
  14. 4,
  15. ];
  16. public function __construct()
  17. {
  18. var_export(self::$array);
  19. }
  20. }
  21. $test = new Test();
  22. ?>
  23. --EXPECT--
  24. array (
  25. 1 => 'first',
  26. 2 => 'second',
  27. 3 => 'third',
  28. 4 => 4,
  29. )