xref: /PHP-8.4/ext/standard/tests/array/gh15982.phpt (revision 27b31314)
1--TEST--
2GH-15982 (Assertion failure with array_find when references are involved)
3--FILE--
4<?php
5$var = "hello";
6$arrayWithRef = [];
7$arrayWithRef[0] =& $var;
8var_dump(array_find($arrayWithRef, fn () => true));
9?>
10--EXPECT--
11string(5) "hello"
12