3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['company' => 'A', 'weight' => 4.6], ['company' => 'B', 'weight' => 1.7], ['company' => 'C', 'weight' => 3.7], ['company' => 'D', 'weight' => 13.2], ['company' => 'E', 'weight' => 1.85], ['company' => 'F', 'weight' => 2.07], ]; array_multisort(array_column($arr, 'weight'), SORT_DESC, $arr); var_export($arr);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
array ( 0 => array ( 'company' => 'D', 'weight' => 13.2, ), 1 => array ( 'company' => 'A', 'weight' => 4.6, ), 2 => array ( 'company' => 'C', 'weight' => 3.7, ), 3 => array ( 'company' => 'F', 'weight' => 2.07, ), 4 => array ( 'company' => 'E', 'weight' => 1.85, ), 5 => array ( 'company' => 'B', 'weight' => 1.7, ), )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 5.6.6 - 5.6.40
array ( 0 => array ( 'company' => 'D', 'weight' => 13.199999999999999, ), 1 => array ( 'company' => 'A', 'weight' => 4.5999999999999996, ), 2 => array ( 'company' => 'C', 'weight' => 3.7000000000000002, ), 3 => array ( 'company' => 'F', 'weight' => 2.0699999999999998, ), 4 => array ( 'company' => 'E', 'weight' => 1.8500000000000001, ), 5 => array ( 'company' => 'B', 'weight' => 1.7, ), )

preferences:
136.5 ms | 410 KiB | 5 Q