1 2 3 4 5 6 7 8 9 10
<?php echo phpversion(), ' '; $testglobal = 1; function cmp($a, $b) { global $testglobal; echo 'hi' . $testglobal; return strcmp($a, $b); } $topics = array(1,2,3); usort($topics, "cmp");
1
5.2.5 hi1hi1