bug75242.phpt 649 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Bug #75242: RecursiveArrayIterator doesn't have constants from parent class
  3. --FILE--
  4. <?php
  5. class Foo extends ArrayIterator { }
  6. $r = new ReflectionClass(Foo::class);
  7. var_dump($r->getConstants());
  8. $r = new ReflectionClass(ArrayIterator::class);
  9. var_dump($r->getConstants());
  10. $r = new ReflectionClass(RecursiveArrayIterator::class);
  11. var_dump($r->getConstants());
  12. ?>
  13. --EXPECT--
  14. array(2) {
  15. ["STD_PROP_LIST"]=>
  16. int(1)
  17. ["ARRAY_AS_PROPS"]=>
  18. int(2)
  19. }
  20. array(2) {
  21. ["STD_PROP_LIST"]=>
  22. int(1)
  23. ["ARRAY_AS_PROPS"]=>
  24. int(2)
  25. }
  26. array(3) {
  27. ["STD_PROP_LIST"]=>
  28. int(1)
  29. ["ARRAY_AS_PROPS"]=>
  30. int(2)
  31. ["CHILD_ARRAYS_ONLY"]=>
  32. int(4)
  33. }