bug27468.phpt 329 B

1234567891011121314151617
  1. --TEST--
  2. Bug #27468 (foreach in __destruct() causes segfault)
  3. --FILE--
  4. <?php
  5. class foo {
  6. function __destruct() {
  7. foreach ($this->x as $x);
  8. }
  9. }
  10. new foo();
  11. echo 'OK';
  12. ?>
  13. --EXPECTF--
  14. Notice: Undefined property: foo::$x in %sbug27468.php on line 4
  15. Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4
  16. OK