bug66015.phpt 434 B

123456789101112131415161718192021222324252627282930
  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. ];
  15. public function __construct()
  16. {
  17. var_export(self::$array);
  18. }
  19. }
  20. $test = new Test();
  21. ?>
  22. --EXPECTF--
  23. array (
  24. 1 => 'first',
  25. 2 => 'second',
  26. 3 => 'third',
  27. )