3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function acasesort($a, $b) { return strcasecmp($a, $b); } class A { function b() { $tags = array('Test', 'tests', 'tes', 'abc'); usort($tags, "acasesort"); var_dump($tags); } } $a = new A; $a->b();
Output for 4.3.0 - 7.1.0
array(4) { [0]=> string(3) "abc" [1]=> string(3) "tes" [2]=> string(4) "Test" [3]=> string(5) "tests" }