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); for($i = 0; $i < 50000; $i++){ usort($telefones, function ($a, $b) { return strtr(substr($a, 5), ['-' => '']) <=> strtr(substr($b, 5), ['-' => '']); }); } echo 'Inkeliz:' . (microtime(true) - $inicio) . "\n";
Output for 7.1.7
Inkeliz:0.1104850769043
Output for 7.1.6
Inkeliz:0.22060108184814
Output for 7.1.5
Inkeliz:0.19162106513977
Output for 7.1.4
Inkeliz:0.29715609550476
Output for 7.1.3
Inkeliz:0.39119100570679
Output for 7.1.2
Inkeliz:0.23952698707581
Output for 7.1.1
Inkeliz:0.2320408821106
Output for 7.1.0
Inkeliz:0.27476906776428
Output for 7.0.20
Inkeliz:0.35439205169678
Output for 7.0.19
Inkeliz:0.3626549243927
Output for 7.0.18
Inkeliz:0.30984210968018
Output for 7.0.17
Inkeliz:0.37575078010559
Output for 7.0.16
Inkeliz:0.28189182281494
Output for 7.0.15
Inkeliz:0.45486497879028
Output for 7.0.14
Inkeliz:0.29327201843262
Output for 7.0.13
Inkeliz:0.42458605766296
Output for 7.0.12
Inkeliz:0.30090379714966
Output for 7.0.11
Inkeliz:0.40907001495361
Output for 7.0.10
Inkeliz:0.28339600563049
Output for 7.0.9
Inkeliz:0.26392602920532
Output for 7.0.8
Inkeliz:0.37119603157043
Output for 7.0.7
Inkeliz:0.30054402351379
Output for 7.0.6
Inkeliz:0.41445398330688
Output for 7.0.5
Inkeliz:0.28473091125488
Output for 7.0.4
Inkeliz:0.35070490837097
Output for 7.0.3
Inkeliz:0.31219291687012
Output for 7.0.2
Inkeliz:0.30987310409546
Output for 7.0.1
Inkeliz:0.3042209148407
Output for 7.0.0
Inkeliz:0.34786295890808