xref: /PHP-8.1/Zend/tests/bug81104.phpt (revision d8165c25)
1--TEST--
2Bug #81104: Warning: "Failed to set memory limit to ... bytes" emitted after exit in debug
3--INI--
4memory_limit=5M
5report_memleaks=0
6--FILE--
7<?php
8class X {
9    public $x;
10    public function __construct() { $this->x = [$this]; }
11}
12gc_disable();
13ini_set('memory_limit', '10M');
14$y = [];
15for ($i = 0; $i < 10000; $i++) {
16    $y[] = new X();
17}
18$y[0]->y = &$y;
19
20?>
21===DONE===
22--EXPECT--
23===DONE===
24