bug76667.phpt 872 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. Bug #76667 (Segfault with divide-assign op and __get + __set)
  3. --FILE--
  4. <?php
  5. class T {
  6. public function __get($k)
  7. {
  8. return $undefined->$k;
  9. }
  10. public function __set($k, $v)
  11. {
  12. return $this->$v /= 0;
  13. }
  14. };
  15. $x = new T;
  16. $x->x = 1;
  17. ?>
  18. --EXPECTF--
  19. Notice: Undefined variable: undefined in %sbug76667.php on line %d
  20. Notice: Trying to get property '1' of non-object in %sbug76667.php on line %d
  21. Warning: Division by zero in %sbug76667.php on line %d
  22. Notice: Undefined variable: undefined in %sbug76667.php on line %d
  23. Notice: Trying to get property 'NAN' of non-object in %sbug76667.php on line %d
  24. Warning: Division by zero in %sbug76667.php on line %d
  25. Notice: Undefined variable: undefined in %sbug76667.php on line %d
  26. Notice: Trying to get property 'NAN' of non-object in %sbug76667.php on line %d
  27. Warning: Division by zero in %sbug76667.php on line %d