3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array( 'div' => 123, 'a' => 'abc', 'p' => 456 ); uksort($a, 'natsort'); var_dump($a);
Output for 7.0.0 - 7.2.0
Warning: natsort() expects exactly 1 parameter, 2 given in /in/O4jDc on line 8 Warning: natsort() expects exactly 1 parameter, 2 given in /in/O4jDc on line 8 array(3) { ["div"]=> int(123) ["a"]=> string(3) "abc" ["p"]=> int(456) }
Output for 5.3.21 - 5.6.28
Warning: natsort() expects exactly 1 parameter, 2 given in /in/O4jDc on line 8 Warning: natsort() expects exactly 1 parameter, 2 given in /in/O4jDc on line 8 array(3) { ["p"]=> int(456) ["a"]=> string(3) "abc" ["div"]=> int(123) }