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