3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 0; $x = array(); $start = microtime( true ); do { $x[] = array( "firstname" => "Patrick", "lastname" => "Allaert" ); ++$i; } while ( $i < 500000 ); echo microtime( true ) - $start, "\n", memory_get_peak_usage(), "\n";
Output for 7.1.0
0.016206026077271 17129312
Output for 7.0.0 - 7.0.14
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/i2WFD on line 6
Process exited with code 255.
Output for hhvm-3.12.0
0.031714200973511 4194304
Output for hhvm-3.10.0
0.040621042251587 4194304
Output for 5.2.1, 5.2.3 - 5.2.5, 5.3.0 - 5.3.10, 5.4.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/i2WFD on line 6
Process exited with code 255.
Output for 5.2.10 - 5.2.17, 5.3.11 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 81 bytes) in /in/i2WFD on line 6
Process exited with code 255.
Output for 5.2.7 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/i2WFD on line 6
Process exited with code 255.
Output for 5.2.6
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/i2WFD on line 6
Process exited with code 255.
Output for 5.2.2
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /in/i2WFD on line 6
Process exited with code 255.
Output for 5.2.0
0.23515510559082 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.6
0.45503306388855 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.5
0.34930896759033 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.4
0.34373497962952 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.3
0.34804701805115 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.2
0.33481216430664 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.1
0.32285118103027 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.1.0
0.36512684822083 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.0.5
0.39474296569824 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.0.4
0.41139507293701 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.0.3
0.41939091682434 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.0.2
0.40252494812012 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.0.1
0.38413619995117 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 5.0.0
0.39256286621094 Fatal error: Call to undefined function memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.9
-0.608526 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.8
0.43767 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.7
0.416049 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.6
-0.583155 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.5
-0.605833 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.4
-0.610345 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.3
0.408993 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.2
0.365811 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.1
0.38799 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.4.0
-0.637394 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.11
0.430976 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.10
-0.523667 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.9
-0.63783 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.8
-0.644298 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.7
-0.531703 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.6
-0.554498 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.5
-0.630793 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.4
0.376638 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.3
0.44694 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.2
0.385841 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Process exited with code 255.
Output for 4.3.1
0.352903 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9
Output for 4.3.0
0.470128 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i2WFD on line 9