3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array(); for($i=0;$i<1000000;$i++) { $data[$i] = 'data-'.$i; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; $test = 0; $count = count($data); for($i=0;$i<$count;$i++) { $test = 'data-'.$i; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo 'Page generated in '.$total_time.' seconds.'."\n"; $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; $test = 0; for($i=0;$i<count($data);$i++) { $test = 'data-'.$i; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo 'Page generated in '.$total_time.' seconds.'."\n";
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for hhvm-3.12.0
Page generated in 0.11 seconds. Page generated in 0.2431 seconds.
Output for hhvm-3.10.0
Page generated in 0.1198 seconds. Page generated in 0.1763 seconds.
Output for 5.5.24 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.4.26 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.4.0 - 5.4.25
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.2.2 - 5.2.9, 5.3.0 - 5.3.28
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 24 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.2.1
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12 bytes) in /in/uBtA0 on line 5
Process exited with code 255.
Output for 5.2.0
Page generated in 0.2583 seconds. Page generated in 0.4157 seconds.
Output for 5.1.6
Page generated in 0.2272 seconds. Page generated in 0.3331 seconds.
Output for 5.1.5
Page generated in 0.3305 seconds. Page generated in 0.4035 seconds.
Output for 5.1.4
Page generated in 0.2127 seconds. Page generated in 0.4372 seconds.
Output for 5.1.3
Page generated in 0.229 seconds. Page generated in 0.3066 seconds.
Output for 5.1.2
Page generated in 0.1942 seconds. Page generated in 0.3848 seconds.
Output for 5.1.1
Page generated in 0.1924 seconds. Page generated in 0.2757 seconds.
Output for 5.1.0
Page generated in 0.1879 seconds. Page generated in 0.36 seconds.
Output for 5.0.5
Page generated in 0.4338 seconds. Page generated in 0.5984 seconds.
Output for 5.0.4
Page generated in 0.4378 seconds. Page generated in 0.5597 seconds.
Output for 5.0.3
Page generated in 0.4203 seconds. Page generated in 0.4976 seconds.
Output for 5.0.2
Page generated in 0.4052 seconds. Page generated in 0.5445 seconds.
Output for 5.0.1
Page generated in 0.4025 seconds. Page generated in 0.5378 seconds.
Output for 5.0.0
Page generated in 0.405 seconds. Page generated in 0.5158 seconds.
Output for 4.4.9
Page generated in 0.3889 seconds. Page generated in 0.4805 seconds.
Output for 4.4.8
Page generated in 0.3823 seconds. Page generated in 0.481 seconds.
Output for 4.4.7
Page generated in 0.388 seconds. Page generated in 0.5261 seconds.
Output for 4.4.6
Page generated in 0.4087 seconds. Page generated in 0.5376 seconds.
Output for 4.4.5
Page generated in 0.3816 seconds. Page generated in 0.4899 seconds.
Output for 4.4.4
Page generated in 0.3958 seconds. Page generated in 0.5292 seconds.
Output for 4.4.3
Page generated in 0.3911 seconds. Page generated in 0.5113 seconds.
Output for 4.4.2
Page generated in 0.4125 seconds. Page generated in 0.5155 seconds.
Output for 4.4.1
Page generated in 0.4056 seconds. Page generated in 0.5012 seconds.
Output for 4.4.0
Page generated in 0.4374 seconds. Page generated in 0.5678 seconds.
Output for 4.3.11
Page generated in 0.3994 seconds. Page generated in 0.5169 seconds.
Output for 4.3.10
Page generated in 0.4288 seconds. Page generated in 0.5322 seconds.
Output for 4.3.9
Page generated in 0.3758 seconds. Page generated in 0.4853 seconds.
Output for 4.3.8
Page generated in 0.4015 seconds. Page generated in 0.5015 seconds.
Output for 4.3.7
Page generated in 0.4127 seconds. Page generated in 0.5314 seconds.
Output for 4.3.6
Page generated in 0.3864 seconds. Page generated in 0.5124 seconds.
Output for 4.3.5
Page generated in 0.396 seconds. Page generated in 0.5342 seconds.
Output for 4.3.4
Page generated in 0.4039 seconds. Page generated in 0.5015 seconds.
Output for 4.3.3
Page generated in 0.4005 seconds. Page generated in 0.5095 seconds.
Output for 4.3.2
Page generated in 0.4121 seconds. Page generated in 0.5133 seconds.
Output for 4.3.1
Page generated in 0.3913 seconds. Page generated in 0.4935 seconds.
Output for 4.3.0
Page generated in 0.5562 seconds. Page generated in 0.7888 seconds.