xref: /PHP-8.2/ext/standard/tests/array/bug69371.phpt (revision b6aeab1b)
1--TEST--
2Bug #69371 (Hash table collision leads to inaccessible array keys)
3--FILE--
4<?php
5$array = array(
6    "d6_node_type" => 1,
7    "d6_filter_format" => 2,
8    "d6_user" => 3,
9    "d6_field_instance_widget_settings" => 4,
10    "d6_field_formatter_settings" => 5,
11);
12
13$weights = array(
14    5, 1, 3, 2, 0
15);
16array_multisort($weights, SORT_DESC, SORT_NUMERIC, $array);
17
18var_dump($array["d6_node_type"]);
19
20?>
21--EXPECT--
22int(1)
23