bug68370.phpt 315 B

1234567891011121314151617
  1. --TEST--
  2. Bug #68370 "unset($this)" can make the program crash
  3. --FILE--
  4. <?php
  5. class C {
  6. public function test() {
  7. unset($this);
  8. return get_defined_vars();
  9. }
  10. }
  11. $c = new C();
  12. $x = $c->test();
  13. print_r($x);
  14. unset($c, $x);
  15. ?>
  16. --EXPECTF--
  17. Fatal error: Cannot unset $this in %sbug68370.php on line 4