xref: /PHP-8.0/Zend/tests/bug73989.phpt (revision f8d79582)
1--TEST--
2Bug #73989 (PHP 7.1 Segfaults within Symfony test suite)
3--FILE--
4<?php
5class Cycle
6{
7    private $thing;
8
9    public function __construct()
10    {
11        $obj = $this;
12        $this->thing = function() use($obj) {};
13    }
14
15    public function __destruct()
16    {
17        ($this->thing)();
18    }
19
20}
21
22for ($i = 0; $i < 10000; ++$i) {
23    $obj = new Cycle();
24}
25echo "OK\n";
26?>
27--EXPECT--
28OK
29