summaryrefslogtreecommitdiff
path: root/Zend/tests/bug61165.phpt
blob: 900a7a8d2b18f73a45cab11e038e6aaf47592cf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #61165 (Segfault - strip_tags())
--FILE--
<?php

$handler = NULL;
class T {
    public $_this;

    public function __toString() {
		global $handler;
	    $handler = $this;
        $this->_this = $this; // <-- uncomment this
        return 'A';
    }
}

$t = new T;
for ($i = 0; $i < 3; $i++) {
    strip_tags($t);
	strip_tags(new T);
}
var_dump($handler);
--EXPECTF--
object(T)#%d (1) {
  ["_this"]=>
  *RECURSION*
}