3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,-1,0,NULL,2,0,-2); $b = array(NULL,-1,0,1,2,-2, 0); $c = array(0,1,-1,0,-2,2,NULL); echo "asort(array(1,-1,0,NULL,2,0,-2))\n"; asort($a, SORT_STRING); print_r($a); echo "\nasort(array(NULL,-1,0,1,2,-2, 0))\n"; asort($b, SORT_STRING); print_r($b); echo "\nasort(array(0,1,-1,0,-2,2,NULL))\n"; asort($c, SORT_STRING); print_r($c);

preferences:
41.69 ms | 402 KiB | 5 Q