xref: /PHP-8.1/ext/spl/tests/fixedarray_022.phpt (revision 52ae6417)
1--TEST--
2SPL: FixedArray: Bug GH-8044 (var_export/debug_zval_dump HT_ASSERT_RC1 debug failure for SplFixedArray)
3--FILE--
4<?php
5call_user_func(function () {
6    $x = new SplFixedArray(1);
7    $x[0] = $x;
8    var_export($x); echo "\n";
9    debug_zval_dump($x); echo "\n";
10});
11?>
12--EXPECTF--
13Warning: var_export does not handle circular references in %s on line 5
14SplFixedArray::__set_state(array(
15   0 => NULL,
16))
17object(SplFixedArray)#2 (1) refcount(4){
18  [0]=>
19  *RECURSION*
20}
21