3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function notref($array) { foreach ($array as $item) { $item; } } $start = microtime(true); $array = range(0, 1000); notref($array); echo 'time: '.(microtime(true) - $start).' sec';
based on dmSRT
Output for 7.2.6
time: 8.1062316894531E-5 sec
Output for 7.2.0
time: 3.7908554077148E-5 sec
Output for 7.1.10
time: 2.0027160644531E-5 sec
Output for 7.0.10, 7.0.12, 7.1.3, 7.1.7
time: 4.1961669921875E-5 sec
Output for 7.1.0, 7.1.6
time: 4.0054321289062E-5 sec
Output for 7.1.5
time: 4.4107437133789E-5 sec
Output for 7.0.0, 7.0.3, 7.0.7, 7.1.4
time: 3.4093856811523E-5 sec
Output for 7.0.11, 7.1.2
time: 4.5061111450195E-5 sec
Output for 7.1.1
time: 4.9114227294922E-5 sec
Output for 7.0.20
time: 4.1007995605469E-5 sec
Output for 7.0.19
time: 4.887580871582E-5 sec
Output for 7.0.1 - 7.0.2, 7.0.18
time: 3.3140182495117E-5 sec
Output for 7.0.17
time: 3.8862228393555E-5 sec
Output for 7.0.6, 7.0.13 - 7.0.16
time: 4.2915344238281E-5 sec
Output for 7.0.4, 7.0.9
time: 3.6001205444336E-5 sec
Output for 7.0.5, 7.0.8
time: 4.4822692871094E-5 sec
Output for hhvm-3.15.4
time: 0.00011396408081055 sec
Output for 5.6.30
time: 0.00037503242492676 sec
Output for 5.6.29
time: 0.00037717819213867 sec
Output for 5.6.28
time: 0.00045919418334961 sec
Output for 5.6.27
time: 0.00026297569274902 sec
Output for 5.6.26
time: 0.00040316581726074 sec
Output for 5.6.25
time: 0.00038504600524902 sec
Output for 5.6.24
time: 0.00051498413085938 sec
Output for 5.6.23
time: 0.00031304359436035 sec
Output for 5.6.22
time: 0.00041007995605469 sec
Output for 5.6.21
time: 0.00038003921508789 sec
Output for 5.6.20
time: 0.00035405158996582 sec
Output for 5.6.1, 5.6.10, 5.6.19
time: 0.00027799606323242 sec
Output for 5.6.18
time: 0.00026583671569824 sec
Output for 5.6.17
time: 0.00036501884460449 sec
Output for 5.6.8, 5.6.11, 5.6.16
time: 0.00026702880859375 sec
Output for 5.6.15
time: 0.00037813186645508 sec
Output for 5.6.14
time: 0.00160813331604 sec
Output for 5.6.13
time: 0.00026512145996094 sec
Output for 5.6.12
time: 0.00029110908508301 sec
Output for 5.6.9
time: 0.00032997131347656 sec
Output for 5.6.4, 5.6.7
time: 0.00038886070251465 sec
Output for 5.6.6
time: 0.00043010711669922 sec
Output for 5.6.5
time: 0.00043988227844238 sec
Output for 5.6.3
time: 0.00039482116699219 sec
Output for 5.6.2
time: 0.00037980079650879 sec
Output for 5.6.0
time: 0.00034093856811523 sec