xref: /php-src/ext/standard/tests/gh13279.phpt (revision d65c3950)
1--TEST--
2GH-13279: Instable array during in-place modification in uksort
3--FILE--
4<?php
5
6// Make sure the array is not const
7$array = [];
8$array['a'] = 1;
9$array['b'] = 2;
10
11uksort($array, function ($a, $b) use (&$array) {
12    return $array[$a] - $array[$b];
13});
14
15?>
16===DONE===
17--EXPECT--
18===DONE===
19