bug75420.phpt 340 B

1234567891011121314151617
  1. --TEST--
  2. Bug #75420 (Crash when modifying property name in __isset for BP_VAR_IS)
  3. --FILE--
  4. <?php
  5. class Test {
  6. public function __isset($x) { $GLOBALS["name"] = 24; return true; }
  7. public function __get($x) { var_dump($x); return 42; }
  8. }
  9. $obj = new Test;
  10. $name = "foo";
  11. var_dump($obj->$name ?? 12);
  12. ?>
  13. --EXPECT--
  14. string(3) "foo"
  15. int(42)