bug61165.phpt 446 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #61165 (Segfault - strip_tags())
  3. --FILE--
  4. <?php
  5. $handler = NULL;
  6. class T {
  7. public $_this;
  8. public function __toString() {
  9. global $handler;
  10. $handler = $this;
  11. $this->_this = $this; // <-- uncomment this
  12. return 'A';
  13. }
  14. }
  15. $t = new T;
  16. for ($i = 0; $i < 3; $i++) {
  17. strip_tags($t);
  18. strip_tags(new T);
  19. }
  20. var_dump($handler);
  21. ?>
  22. --EXPECTF--
  23. object(T)#%d (1) {
  24. ["_this"]=>
  25. *RECURSION*
  26. }