bug45742.phpt 370 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #45742 Wrong class array inpretetion using constant indexes
  3. --FILE--
  4. <?php
  5. class Constants {
  6. // Needs to be equal
  7. const A = 1;
  8. const B = 1;
  9. }
  10. class ArrayProperty {
  11. public static $array = array(
  12. Constants::A => 23,
  13. Constants::B => 42,
  14. );
  15. }
  16. var_dump( ArrayProperty::$array );
  17. ?>
  18. --EXPECT--
  19. array(1) {
  20. [1]=>
  21. int(42)
  22. }