bug79820.phpt 425 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #79820: Use after free when type duplicated into ReflectionProperty gets resolved
  3. --FILE--
  4. <?php
  5. class Test {
  6. public stdClass $prop;
  7. }
  8. $rp = new ReflectionProperty(Test::class, 'prop');
  9. $test = new Test;
  10. $test->prop = new stdClass;
  11. var_dump($rp->getType()->getName());
  12. $test->dynProp = 42;
  13. $rp = new ReflectionProperty($test, 'dynProp');
  14. var_dump($rp->getType());
  15. ?>
  16. --EXPECT--
  17. string(8) "stdClass"
  18. NULL