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 #73989 (PHP 7.1 Segfaults within Symfony test suite) --FILE-- <?php class Cycle { private $thing; public function __construct() { $obj = $this; $this->thing = function() use($obj) {}; } public function __destruct() { ($this->thing)(); } } for ($i = 0; $i < 10000; ++$i) { $obj = new Cycle(); } echo "OK\n"; ?> --EXPECT-- OK