3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); setlocale(LC_COLLATE, 'tr_TR.utf8'); // or any other locale I use. $aInput['values'] = array('foo',1,'bar',2,'baz',true,'quux',false,'abc',null); uasort($aInput['values'],'strcoll'); var_dump($aInput['values']);
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(10) { [7]=> bool(false) [9]=> NULL [1]=> int(1) [5]=> bool(true) [3]=> int(2) [8]=> string(3) "abc" [2]=> string(3) "bar" [4]=> string(3) "baz" [0]=> string(3) "foo" [6]=> string(4) "quux" }
Output for 4.3.0 - 5.6.28
array(10) { [9]=> NULL [7]=> bool(false) [1]=> int(1) [5]=> bool(true) [3]=> int(2) [8]=> string(3) "abc" [2]=> string(3) "bar" [4]=> string(3) "baz" [0]=> string(3) "foo" [6]=> string(4) "quux" }