xref: /PHP-8.2/Zend/tests/bug81104.phpt (revision 902d6439)
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
8#[AllowDynamicProperties]
9class X {
10    public $x;
11    public function __construct() { $this->x = [$this]; }
12}
13gc_disable();
14ini_set('memory_limit', '10M');
15$y = [];
16for ($i = 0; $i < 10000; $i++) {
17    $y[] = new X();
18}
19$y[0]->y = &$y;
20
21?>
22===DONE===
23--EXPECT--
24===DONE===
25