3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $range = range(1,1000000); $start_time = microtime(); array_shift($range); $end_time = microtime(); echo $end_time - $start_time; $start_time = microtime(); count($range); $end_time = microtime(); echo $end_time - $start_time;
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/ovu7j on line 11 Notice: A non well formed numeric value encountered in /in/ovu7j on line 11 0.003836 Notice: A non well formed numeric value encountered in /in/ovu7j on line 21 Notice: A non well formed numeric value encountered in /in/ovu7j on line 21 2.0000000000003E-6
Output for 7.0.14
0.004942.9999999999995E-6
Output for 7.0.12
0.0037122.0000000000003E-6
Output for 7.0.6
0.0034452.000000000002E-6
Output for 7.0.5
0.0035661.9999999999465E-6
Output for 7.0.4
0.005132.9999999999752E-6
Output for 7.0.3
0.003891.000000000001E-6
Output for 7.0.2
0.00412499999999991.0000000000288E-6
Output for 7.0.1
0.0035662.000000000002E-6
Output for 7.0.0
0.0052012.0000000000575E-6
Output for hhvm-3.12.0
0.0021266.9999999999792E-6
Output for hhvm-3.10.0
0.00233.0000000000308E-6
Output for 5.3.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/ovu7j on line 3
Process exited with code 255.
Output for 5.2.2 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/ovu7j on line 3
Process exited with code 255.
Output for 5.2.1
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/ovu7j on line 3
Process exited with code 255.
Output for 5.2.0
0.028641.9999999999465E-06
Output for 5.1.6
0.0396621.9999999999465E-06
Output for 5.1.5
0.0397752.0000000000575E-06
Output for 5.1.4
0.039962.000000000002E-06
Output for 5.1.3
0.0419154.000000000004E-06
Output for 5.1.2
0.0426332.9999999999752E-06
Output for 5.1.1
0.0413312.9999999999752E-06
Output for 5.1.0
0.0399842.9999999999752E-06
Output for 5.0.5
0.041274.000000000004E-06
Output for 5.0.4
0.039894.000000000004E-06
Output for 5.0.3
0.0398962.9999999999752E-06
Output for 5.0.2
0.0397293.000000000003E-06
Output for 5.0.1
0.0397751.9999999999465E-06
Output for 5.0.0
0.0399311.9999999999465E-06
Output for 4.4.9
0.0417079.9999999999545E-06
Output for 4.4.8
0.0415321.9999999999465E-06
Output for 4.4.7
0.0416692.0000000000575E-06
Output for 4.4.6
0.0415652.000000000002E-06
Output for 4.4.5
0.0433824.000000000004E-06
Output for 4.4.4
0.041442.9999999999752E-06
Output for 4.4.3
0.0422592.000000000002E-06
Output for 4.4.2
0.041692.9999999999752E-06
Output for 4.4.1
0.0414442.9999999999752E-06
Output for 4.4.0
0.0413372.000000000002E-06
Output for 4.3.11
0.041848.000000000008E-06
Output for 4.3.10
-0.9583492.9999999999995E-06
Output for 4.3.9
0.0411492.9999999999752E-06
Output for 4.3.8
0.0413642.9999999999752E-06
Output for 4.3.7
-0.9586983.9999999999971E-06
Output for 4.3.6
0.0413673.0000000000308E-06
Output for 4.3.5
0.0428752.9999999999752E-06
Output for 4.3.4
-0.9564153.9999999999971E-06
Output for 4.3.3
0.0417242.9999999999752E-06
Output for 4.3.2
0.0447872.9999999999752E-06
Output for 4.3.1
0.0420582.9999999999752E-06
Output for 4.3.0
0.0421192.9999999999752E-06