3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for($i = 0; $i < 100000000; $i++) { if(2 === 0) {} else if(2 === 1) {} else {} } $end = microtime(true); echo "1: ".($end - $start)."\n"; unset($start, $end); $start = microtime(true); for($i = 0; $i < 100000000; $i++) { if(2 === 0) {} elseif(2 === 1) {} else {} } $end = microtime(true); echo "2: ".($end - $start); ?>
Output for 7.2.0
1: 1.2077729701996 2: 1.1705629825592
Output for 7.1.7
1: 1.1072001457214 2: 1.1463239192963
Output for 7.1.6
1: 1.144464969635 2: 1.0662131309509
Output for 7.1.5
1: 1.2250890731812 2: 1.2284510135651
Output for 7.1.0
1: 1.1844201087952 2: 1.077800989151
Output for 7.0.20
1: 1.4167068004608
Process exited with code 137.
Output for 7.0.14
1: 1.204558134079
Process exited with code 137.
Output for 7.0.6
1: 1.0992839336395 2: 0.97460603713989
Output for 7.0.5
1: 1.1818389892578 2: 1.1345980167389
Output for 7.0.4
1: 1.1367719173431 2: 1.0933640003204
Output for 7.0.3
1: 1.1095371246338 2: 1.0942587852478
Output for 7.0.2
1: 1.254851102829
Process exited with code 137.
Output for 7.0.1
1: 1.1276161670685 2: 1.0907199382782
Output for 7.0.0
1: 1.1021270751953 2: 1.0854749679565
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28

Process exited with code 137.

preferences:
105.45 ms | 402 KiB | 91 Q