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; // <-- uncomment 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?> 25--EXPECTF-- 26object(T)#%d (1) { 27 ["_this"]=> 28 *RECURSION* 29} 30