3v4l.org

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