3v4l.org

run code in 300+ PHP versions simultaneously
<?php $telefones = [ '(11) 3333-4353', '(11) 98000-2222', '(11) 3027-5555', '(11) 97000-0333', '(12) 99999-9999', '(12) 88888-8888', '(13) 11111-1111' ]; $inicio = microtime(true); function sortNumber($a, $b) { $a = preg_replace('/\D/', '', $a); $b = preg_replace('/\D/', '', $b); return ($a > $b) ? -1 : 1; } for($i = 0; $i < 50000; $i++){ usort($telefones, 'sortNumber'); } echo 'Bruno Rigolon:' . (microtime(true) - $inicio) . "\n";

Abusive script

This script was stopped while abusing our resources


preferences:
27.78 ms | 406 KiB | 5 Q