xref: /PHP-8.2/Zend/tests/bug43918.phpt (revision 74859783)
1--TEST--
2Bug #43918 (Segmentation fault in garbage collector)
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7$xmlstr = <<<XML
8<?xml version='1.0' standalone='yes'?>
9<movies>
10 <movie>
11  <title>TEST</title>
12 </movie>
13 <movie>
14  <title>TEST</title>
15 </movie>
16 <movie>
17  <title>TEST</title>
18 </movie>
19 <movie>
20  <title>TEST</title>
21 </movie>
22 <movie>
23  <title>TEST</title>
24 </movie>
25 <movie>
26  <title>TEST</title>
27 </movie>
28 <movie>
29  <title>TEST</title>
30 </movie>
31</movies>
32XML;
33
34$Array = array( );
35for( $XX = 0; $XX < 2000; ++$XX )
36{
37 $Array[] = $xml = new SimpleXMLElement($xmlstr);
38}
39
40gc_collect_cycles( );
41echo "ok\n";
42?>
43--EXPECT--
44ok
45