3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.1.0
1: 1.5505530834198
Process exited with code 137.
Output for 7.0.14
1: 0.94594502449036
Process exited with code 137.
Output for 7.0.6
1: 1.1723890304565 2: 1.1303389072418
Output for 7.0.5
1: 1.1873209476471 2: 1.1413879394531
Output for 7.0.4
1: 1.1494538784027 2: 1.1187751293182
Output for 7.0.3
1: 1.1072421073914 2: 1.0915760993958
Output for 7.0.2
1: 1.1269750595093 2: 1.095782995224
Output for 7.0.1
1: 1.1171140670776 2: 1.089595079422
Output for 7.0.0
1: 1.0932109355927 2: 1.0593569278717
Output for 5.3.9 - 5.6.28, hhvm-3.10.0 - 3.12.0

Process exited with code 137.