3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test($str) { test2($str); } function test2($str) { test3($str); } function test3($str) { echo "before: ".round(memory_get_usage()/1024/1024, 2)." MB\n"; $t = microtime(true); debug_backtrace(false); echo "time: ".(microtime(true)-$t)." ms\n"; echo "after: ".round(memory_get_usage()/1024/1024, 2)." MB\n"; } test(str_repeat('a', 10000));
Output for 7.0.1, 7.0.3, 7.0.12, 7.1.0
before: 0.34 MB time: 4.0531158447266E-6 ms after: 0.34 MB
Output for 7.0.14
before: 0.34 MB time: 5.9604644775391E-6 ms after: 0.34 MB
Output for 7.0.0, 7.0.2, 7.0.4, 7.0.6
before: 0.34 MB time: 5.0067901611328E-6 ms after: 0.34 MB
Output for 7.0.5
before: 0.34 MB time: 2.8610229492188E-6 ms after: 0.34 MB
Output for 5.4.1, 5.6.28
before: 0.22 MB time: 2.4795532226562E-5 ms after: 0.25 MB
Output for 5.4.39, 5.5.28, 5.5.32, 5.6.21
before: 0.22 MB time: 2.598762512207E-5 ms after: 0.25 MB
Output for 5.4.32, 5.4.35, 5.6.18, 5.6.20
before: 0.22 MB time: 2.3126602172852E-5 ms after: 0.25 MB
Output for 5.4.4, 5.4.36, 5.5.31, 5.6.19
before: 0.22 MB time: 1.7881393432617E-5 ms after: 0.25 MB
Output for 5.5.33, 5.6.17
before: 0.22 MB time: 3.2901763916016E-5 ms after: 0.25 MB
Output for 5.4.3, 5.6.16
before: 0.22 MB time: 2.9087066650391E-5 ms after: 0.25 MB
Output for 5.4.21, 5.6.12, 5.6.15
before: 0.22 MB time: 1.9073486328125E-5 ms after: 0.25 MB
Output for 5.6.11, 5.6.14
before: 0.22 MB time: 2.1934509277344E-5 ms after: 0.25 MB
Output for 5.4.23, 5.6.13
before: 0.22 MB time: 3.0040740966797E-5 ms after: 0.25 MB
Output for 5.6.10
before: 0.22 MB time: 2.8848648071289E-5 ms after: 0.25 MB
Output for 5.4.15, 5.6.9
before: 0.22 MB time: 2.0027160644531E-5 ms after: 0.25 MB
Output for 5.4.0, 5.4.2, 5.4.8, 5.4.10, 5.4.22, 5.4.26, 5.4.38, 5.4.41, 5.5.27, 5.6.8
before: 0.22 MB time: 2.4080276489258E-5 ms after: 0.25 MB
Output for 5.4.5, 5.4.13, 5.4.18 - 5.4.19, 5.4.31, 5.4.37, 5.4.40, 5.5.35
before: 0.22 MB time: 1.6927719116211E-5 ms after: 0.25 MB
Output for 5.5.26, 5.5.34
before: 0.22 MB time: 2.0980834960938E-5 ms after: 0.25 MB
Output for 5.4.11, 5.4.42, 5.4.45, 5.5.30
before: 0.22 MB time: 1.8119812011719E-5 ms after: 0.25 MB
Output for 5.4.12, 5.4.14, 5.4.17, 5.4.24, 5.4.30, 5.4.43, 5.5.29
before: 0.22 MB time: 1.5974044799805E-5 ms after: 0.25 MB
Output for 5.4.9, 5.5.24 - 5.5.25
before: 0.22 MB time: 2.8133392333984E-5 ms after: 0.25 MB
Output for 5.4.6, 5.4.34, 5.4.44
before: 0.22 MB time: 2.5033950805664E-5 ms after: 0.25 MB
Output for 5.4.29
before: 0.22 MB time: 2.288818359375E-5 ms after: 0.25 MB
Output for 5.4.20, 5.4.28
before: 0.22 MB time: 2.3841857910156E-5 ms after: 0.25 MB
Output for 5.4.27
before: 0.22 MB time: 1.5020370483398E-5 ms after: 0.25 MB
Output for 5.4.25
before: 0.22 MB time: 3.504753112793E-5 ms after: 0.25 MB
Output for 5.4.16
before: 0.22 MB time: 1.6212463378906E-5 ms after: 0.25 MB
Output for 5.4.7
before: 0.22 MB time: 1.7166137695312E-5 ms after: 0.25 MB
Output for 5.3.7, 5.3.16, 5.3.29
before: 0.61 MB time: 2.0027160644531E-5 ms after: 0.64 MB
Output for 5.3.28
before: 0.61 MB time: 1.8835067749023E-5 ms after: 0.64 MB
Output for 5.3.2, 5.3.11, 5.3.27
before: 0.61 MB time: 1.5020370483398E-5 ms after: 0.64 MB
Output for 5.3.5 - 5.3.6, 5.3.17, 5.3.20, 5.3.25 - 5.3.26
before: 0.61 MB time: 1.4066696166992E-5 ms after: 0.64 MB
Output for 5.3.15, 5.3.19, 5.3.24
before: 0.61 MB time: 1.3828277587891E-5 ms after: 0.64 MB
Output for 5.3.0, 5.3.23
before: 0.61 MB time: 1.8119812011719E-5 ms after: 0.64 MB
Output for 5.3.4, 5.3.22
before: 0.61 MB time: 1.7881393432617E-5 ms after: 0.64 MB
Output for 5.3.21
before: 0.61 MB time: 1.2874603271484E-5 ms after: 0.64 MB
Output for 5.3.8, 5.3.18
before: 0.61 MB time: 1.5974044799805E-5 ms after: 0.64 MB
Output for 5.3.14
before: 0.61 MB time: 2.6941299438477E-5 ms after: 0.64 MB
Output for 5.3.13
before: 0.61 MB time: 2.4795532226562E-5 ms after: 0.64 MB
Output for 5.3.12
before: 0.61 MB time: 2.2172927856445E-5 ms after: 0.64 MB
Output for 5.3.10
before: 0.61 MB time: 1.3113021850586E-5 ms after: 0.64 MB
Output for 5.3.9
before: 0.61 MB time: 2.4080276489258E-5 ms after: 0.64 MB
Output for 5.3.3
before: 0.61 MB time: 2.0980834960938E-5 ms after: 0.64 MB
Output for 5.3.1
before: 0.61 MB time: 2.5033950805664E-5 ms after: 0.64 MB
Output for 5.2.17
before: 0.09 MB time: 2.598762512207E-5 ms after: 0.12 MB
Output for 5.2.16
before: 0.09 MB time: 1.4066696166992E-5 ms after: 0.12 MB
Output for 5.2.15
before: 0.09 MB time: 2.4080276489258E-5 ms after: 0.12 MB
Output for 5.2.14
before: 0.09 MB time: 1.7881393432617E-5 ms after: 0.12 MB
Output for 5.2.13
before: 0.09 MB time: 1.3113021850586E-5 ms after: 0.12 MB
Output for 5.2.12
before: 0.09 MB time: 2.288818359375E-5 ms after: 0.12 MB
Output for 5.2.7, 5.2.11
before: 0.09 MB time: 2.0980834960938E-5 ms after: 0.12 MB
Output for 5.2.10
before: 0.09 MB time: 2.9087066650391E-5 ms after: 0.12 MB
Output for 5.2.9
before: 0.09 MB time: 3.0040740966797E-5 ms after: 0.12 MB
Output for 5.2.8
before: 0.09 MB time: 1.6927719116211E-5 ms after: 0.12 MB
Output for 5.2.5 - 5.2.6
before: 0.09 MB time: 1.5020370483398E-5 ms after: 0.12 MB
Output for 5.2.2, 5.2.4
before: 0.09 MB Warning: Wrong parameter count for debug_backtrace() in /in/usEsb on line 11 time: 1.215934753418E-5 ms after: 0.09 MB
Output for 5.2.3
before: 0.09 MB Warning: Wrong parameter count for debug_backtrace() in /in/usEsb on line 11 time: 1.2874603271484E-5 ms after: 0.09 MB
Output for 5.2.1
before: 0.09 MB Warning: Wrong parameter count for debug_backtrace() in /in/usEsb on line 11 time: 5.9604644775391E-06 ms after: 0.09 MB
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/usEsb on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/usEsb on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/usEsb on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/usEsb on line 9