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', 10000000));
Output for 7.0.2 - 7.0.3, 7.1.0
before: 9.87 MB time: 5.9604644775391E-6 ms after: 9.87 MB
Output for 7.0.1, 7.0.14
before: 9.87 MB time: 7.8678131103516E-6 ms after: 9.87 MB
Output for 7.0.6 - 7.0.7, 7.0.10
before: 9.87 MB time: 6.9141387939453E-6 ms after: 9.87 MB
Output for 7.0.9
before: 9.87 MB time: 3.814697265625E-6 ms after: 9.87 MB
Output for 7.0.0, 7.0.4 - 7.0.5, 7.0.8
before: 9.87 MB time: 5.0067901611328E-6 ms after: 9.87 MB
Output for hhvm-3.12.0
before: 2 MB time: 0.00030112266540527 ms after: 2 MB
Output for hhvm-3.10.0
before: 2 MB time: 0.00038409233093262 ms after: 2 MB
Output for 5.6.28
before: 9.75 MB time: 0.0097510814666748 ms after: 38.36 MB
Output for 5.6.25
before: 9.75 MB time: 0.011311054229736 ms after: 38.36 MB
Output for 5.6.24
before: 9.75 MB time: 0.013890981674194 ms after: 38.36 MB
Output for 5.6.23
before: 9.75 MB time: 0.010330200195312 ms after: 38.36 MB
Output for 5.6.22
before: 9.75 MB time: 0.010478019714355 ms after: 38.36 MB
Output for 5.6.21
before: 9.75 MB time: 0.014405012130737 ms after: 38.36 MB
Output for 5.6.20
before: 9.75 MB time: 0.013590812683105 ms after: 38.36 MB
Output for 5.6.19
before: 9.75 MB time: 0.013995885848999 ms after: 38.36 MB
Output for 5.6.18
before: 9.75 MB time: 0.012655973434448 ms after: 38.36 MB
Output for 5.6.17
before: 9.75 MB time: 0.012303829193115 ms after: 38.36 MB
Output for 5.6.16
before: 9.75 MB time: 0.016674041748047 ms after: 38.36 MB
Output for 5.6.15
before: 9.75 MB time: 0.014656066894531 ms after: 38.36 MB
Output for 5.6.14
before: 9.75 MB time: 0.014096021652222 ms after: 38.36 MB
Output for 5.6.13
before: 9.75 MB time: 0.015779972076416 ms after: 38.36 MB
Output for 5.6.12
before: 9.75 MB time: 0.018250942230225 ms after: 38.36 MB
Output for 5.6.11
before: 9.75 MB time: 0.014629125595093 ms after: 38.36 MB
Output for 5.6.10
before: 9.75 MB time: 0.016593933105469 ms after: 38.36 MB
Output for 5.6.9
before: 9.75 MB time: 0.015864133834839 ms after: 38.36 MB
Output for 5.6.8
before: 9.75 MB time: 0.013674020767212 ms after: 38.36 MB
Output for 5.6.7
before: 9.75 MB time: 0.017976045608521 ms after: 38.36 MB
Output for 5.6.6
before: 9.75 MB time: 0.018357992172241 ms after: 38.36 MB
Output for 5.6.5
before: 9.75 MB time: 0.018580913543701 ms after: 38.36 MB
Output for 5.6.4
before: 9.75 MB time: 0.015738010406494 ms after: 38.36 MB
Output for 5.6.3
before: 9.75 MB time: 0.016439914703369 ms after: 38.36 MB
Output for 5.6.2
before: 9.75 MB time: 0.01728892326355 ms after: 38.36 MB
Output for 5.6.1
before: 9.75 MB time: 0.017508983612061 ms after: 38.36 MB
Output for 5.6.0
before: 9.75 MB time: 0.014328956604004 ms after: 38.36 MB
Output for 5.5.38
before: 9.75 MB time: 0.01153302192688 ms after: 38.36 MB
Output for 5.5.37
before: 9.75 MB time: 0.011343002319336 ms after: 38.36 MB
Output for 5.5.36
before: 9.75 MB time: 0.013893127441406 ms after: 38.36 MB
Output for 5.5.35
before: 9.75 MB time: 0.011761903762817 ms after: 38.36 MB
Output for 5.5.34
before: 9.75 MB time: 0.016931056976318 ms after: 38.36 MB
Output for 5.5.33
before: 9.75 MB time: 0.014636039733887 ms after: 38.36 MB
Output for 5.5.32
before: 9.75 MB time: 0.015027046203613 ms after: 38.36 MB
Output for 5.5.31
before: 9.75 MB time: 0.017396926879883 ms after: 38.36 MB
Output for 5.5.30
before: 9.75 MB time: 0.017435073852539 ms after: 38.36 MB
Output for 5.5.29
before: 9.75 MB time: 0.018635988235474 ms after: 38.36 MB
Output for 5.5.28
before: 9.75 MB time: 0.015743970870972 ms after: 38.36 MB
Output for 5.5.27
before: 9.75 MB time: 0.01692795753479 ms after: 38.36 MB
Output for 5.5.26
before: 9.75 MB time: 0.019037008285522 ms after: 38.36 MB
Output for 5.5.25
before: 9.75 MB time: 0.018594980239868 ms after: 38.36 MB
Output for 5.5.24
before: 9.75 MB time: 0.018036842346191 ms after: 38.36 MB
Output for 5.5.23
before: 9.75 MB time: 0.017257928848267 ms after: 38.36 MB
Output for 5.5.22
before: 9.75 MB time: 0.017121076583862 ms after: 38.36 MB
Output for 5.5.21
before: 9.75 MB time: 0.016751050949097 ms after: 38.36 MB
Output for 5.5.20
before: 9.75 MB time: 0.019469022750854 ms after: 38.36 MB
Output for 5.5.19
before: 9.75 MB time: 0.016976118087769 ms after: 38.36 MB
Output for 5.5.18
before: 9.75 MB time: 0.016635894775391 ms after: 38.36 MB
Output for 5.5.16
before: 9.75 MB time: 0.015947818756104 ms after: 38.36 MB
Output for 5.5.15
before: 9.75 MB time: 0.01882004737854 ms after: 38.36 MB
Output for 5.5.14
before: 9.75 MB time: 0.015799045562744 ms after: 38.36 MB
Output for 5.5.13
before: 9.75 MB time: 0.017360925674438 ms after: 38.36 MB
Output for 5.5.12
before: 9.75 MB time: 0.0174400806427 ms after: 38.36 MB
Output for 5.5.11
before: 9.75 MB time: 0.016793966293335 ms after: 38.36 MB
Output for 5.5.10
before: 9.75 MB time: 0.016471147537231 ms after: 38.36 MB
Output for 5.5.9
before: 9.75 MB time: 0.015838861465454 ms after: 38.36 MB
Output for 5.5.8
before: 9.75 MB time: 0.017560005187988 ms after: 38.36 MB
Output for 5.5.7
before: 9.75 MB time: 0.015666007995605 ms after: 38.36 MB
Output for 5.5.6
before: 9.75 MB time: 0.018640041351318 ms after: 38.36 MB
Output for 5.5.5
before: 9.75 MB time: 0.019100904464722 ms after: 38.36 MB
Output for 5.5.4
before: 9.75 MB time: 0.01971697807312 ms after: 38.36 MB
Output for 5.5.3
before: 9.75 MB time: 0.01683497428894 ms after: 38.36 MB
Output for 5.5.2
before: 9.75 MB time: 0.015499830245972 ms after: 38.36 MB
Output for 5.5.1
before: 9.75 MB time: 0.016967058181763 ms after: 38.36 MB
Output for 5.4.34, 5.5.0
before: 9.75 MB time: 0.017782926559448 ms after: 38.36 MB
Output for 5.4.45
before: 9.75 MB time: 0.017611026763916 ms after: 38.36 MB
Output for 5.4.44
before: 9.75 MB time: 0.018148183822632 ms after: 38.36 MB
Output for 5.4.43
before: 9.75 MB time: 0.014987945556641 ms after: 38.36 MB
Output for 5.4.42
before: 9.75 MB time: 0.018099069595337 ms after: 38.36 MB
Output for 5.4.41
before: 9.75 MB time: 0.01796293258667 ms after: 38.36 MB
Output for 5.4.40
before: 9.75 MB time: 0.017993927001953 ms after: 38.36 MB
Output for 5.4.39
before: 9.75 MB time: 0.015933036804199 ms after: 38.36 MB
Output for 5.4.38
before: 9.75 MB time: 0.018908023834229 ms after: 38.36 MB
Output for 5.4.37
before: 9.75 MB time: 0.019468069076538 ms after: 38.36 MB
Output for 5.4.36
before: 9.75 MB time: 0.016944169998169 ms after: 38.36 MB
Output for 5.4.35
before: 9.75 MB time: 0.015294790267944 ms after: 38.36 MB
Output for 5.4.32
before: 9.75 MB time: 0.015954971313477 ms after: 38.36 MB
Output for 5.4.31
before: 9.75 MB time: 0.016043186187744 ms after: 38.36 MB
Output for 5.4.30
before: 9.75 MB time: 0.016153812408447 ms after: 38.36 MB
Output for 5.4.29
before: 9.75 MB time: 0.017935037612915 ms after: 38.36 MB
Output for 5.4.28
before: 9.75 MB time: 0.0156090259552 ms after: 38.36 MB
Output for 5.4.27
before: 9.75 MB time: 0.016635179519653 ms after: 38.36 MB
Output for 5.4.26
before: 9.75 MB time: 0.016426801681519 ms after: 38.36 MB
Output for 5.4.25
before: 9.75 MB time: 0.016533851623535 ms after: 38.36 MB
Output for 5.4.24
before: 9.75 MB time: 0.01754093170166 ms after: 38.36 MB
Output for 5.4.23
before: 9.75 MB time: 0.018702983856201 ms after: 38.36 MB
Output for 5.4.22
before: 9.75 MB time: 0.015048027038574 ms after: 38.36 MB
Output for 5.4.21
before: 9.75 MB time: 0.017950057983398 ms after: 38.36 MB
Output for 5.4.20
before: 9.75 MB time: 0.018401861190796 ms after: 38.36 MB
Output for 5.4.19
before: 9.75 MB time: 0.01793098449707 ms after: 38.36 MB
Output for 5.4.18
before: 9.75 MB time: 0.017043113708496 ms after: 38.36 MB
Output for 5.4.17
before: 9.75 MB time: 0.017428874969482 ms after: 38.36 MB
Output for 5.4.16
before: 9.75 MB time: 0.015367031097412 ms after: 38.36 MB
Output for 5.4.15
before: 9.75 MB time: 0.015845060348511 ms after: 38.36 MB
Output for 5.4.14
before: 9.75 MB time: 0.017725944519043 ms after: 38.36 MB
Output for 5.4.13
before: 9.75 MB time: 0.020786046981812 ms after: 38.36 MB
Output for 5.4.12
before: 9.75 MB time: 0.02128791809082 ms after: 38.36 MB
Output for 5.4.11
before: 9.75 MB time: 0.016700029373169 ms after: 38.36 MB
Output for 5.4.10
before: 9.75 MB time: 0.014581918716431 ms after: 38.36 MB
Output for 5.4.9
before: 9.75 MB time: 0.015461921691895 ms after: 38.36 MB
Output for 5.4.8
before: 9.75 MB time: 0.019731998443604 ms after: 38.36 MB
Output for 5.4.7
before: 9.75 MB time: 0.01825213432312 ms after: 38.36 MB
Output for 5.4.6
before: 9.75 MB time: 0.017422914505005 ms after: 38.36 MB
Output for 5.4.5
before: 9.75 MB time: 0.017906188964844 ms after: 38.36 MB
Output for 5.4.4
before: 9.75 MB time: 0.017332077026367 ms after: 38.36 MB
Output for 5.4.3
before: 9.75 MB time: 0.01715612411499 ms after: 38.36 MB
Output for 5.4.2
before: 9.75 MB time: 0.020292043685913 ms after: 38.36 MB
Output for 5.4.1
before: 9.75 MB time: 0.016151905059814 ms after: 38.36 MB
Output for 5.4.0
before: 9.75 MB time: 0.018876075744629 ms after: 38.36 MB
Output for 5.3.29
before: 10.13 MB time: 0.016029834747314 ms after: 38.74 MB
Output for 5.3.28
before: 10.13 MB time: 0.019123077392578 ms after: 38.74 MB
Output for 5.3.27
before: 10.13 MB time: 0.017374038696289 ms after: 38.74 MB
Output for 5.3.26
before: 10.13 MB time: 0.018694162368774 ms after: 38.74 MB
Output for 5.3.25
before: 10.13 MB time: 0.015856027603149 ms after: 38.74 MB
Output for 5.3.24
before: 10.13 MB time: 0.015332937240601 ms after: 38.74 MB
Output for 5.3.23
before: 10.13 MB time: 0.019278049468994 ms after: 38.74 MB
Output for 5.3.22
before: 10.13 MB time: 0.016819000244141 ms after: 38.74 MB
Output for 5.3.21
before: 10.13 MB time: 0.019561052322388 ms after: 38.74 MB
Output for 5.3.20
before: 10.13 MB time: 0.019176959991455 ms after: 38.74 MB
Output for 5.3.19
before: 10.13 MB time: 0.015084028244019 ms after: 38.74 MB
Output for 5.3.18
before: 10.13 MB time: 0.017596960067749 ms after: 38.74 MB
Output for 5.3.17
before: 10.13 MB time: 0.015584945678711 ms after: 38.74 MB
Output for 5.3.16
before: 10.13 MB time: 0.014853000640869 ms after: 38.74 MB
Output for 5.3.15
before: 10.13 MB time: 0.016597032546997 ms after: 38.74 MB
Output for 5.3.14
before: 10.13 MB time: 0.015210151672363 ms after: 38.74 MB
Output for 5.3.13
before: 10.13 MB time: 0.014714956283569 ms after: 38.74 MB
Output for 5.3.9, 5.3.12
before: 10.13 MB time: 0.016187906265259 ms after: 38.74 MB
Output for 5.3.11
before: 10.13 MB time: 0.021567106246948 ms after: 38.74 MB
Output for 5.3.10
before: 10.13 MB time: 0.017894983291626 ms after: 38.74 MB
Output for 5.3.8
before: 10.13 MB time: 0.015914916992188 ms after: 38.74 MB
Output for 5.3.7
before: 10.13 MB time: 0.01833701133728 ms after: 38.74 MB
Output for 5.3.6
before: 10.13 MB time: 0.02067494392395 ms after: 38.74 MB
Output for 5.3.5
before: 10.13 MB time: 0.017773866653442 ms after: 38.74 MB
Output for 5.3.4
before: 10.13 MB time: 0.015942096710205 ms after: 38.74 MB
Output for 5.3.3
before: 10.13 MB time: 0.017838001251221 ms after: 38.74 MB
Output for 5.3.2
before: 10.13 MB time: 0.022797107696533 ms after: 38.74 MB
Output for 5.3.1
before: 10.13 MB time: 0.018763780593872 ms after: 38.74 MB
Output for 5.3.0
before: 10.13 MB time: 0.018543004989624 ms after: 38.74 MB
Output for 5.2.17
before: 9.62 MB time: 0.019625902175903 ms after: 38.23 MB
Output for 5.2.16
before: 9.62 MB time: 0.020173072814941 ms after: 38.23 MB
Output for 5.2.15
before: 9.62 MB time: 0.017982959747314 ms after: 38.23 MB
Output for 5.2.14
before: 9.62 MB time: 0.017918109893799 ms after: 38.23 MB
Output for 5.2.13
before: 9.62 MB time: 0.019623041152954 ms after: 38.23 MB
Output for 5.2.12
before: 9.62 MB time: 0.015262126922607 ms after: 38.23 MB
Output for 5.2.11
before: 9.62 MB time: 0.01570200920105 ms after: 38.23 MB
Output for 5.2.10
before: 9.62 MB time: 0.016051054000854 ms after: 38.23 MB
Output for 5.2.9
before: 9.62 MB time: 0.014662027359009 ms after: 38.23 MB
Output for 5.2.8
before: 9.62 MB time: 0.017218828201294 ms after: 38.23 MB
Output for 5.2.7
before: 9.62 MB time: 0.018312931060791 ms after: 38.23 MB
Output for 5.2.6
before: 9.62 MB time: 0.016880989074707 ms after: 38.23 MB
Output for 5.2.5
before: 9.62 MB time: 0.017860174179077 ms after: 38.23 MB
Output for 5.2.4
before: 9.62 MB Warning: Wrong parameter count for debug_backtrace() in /in/hWbBN on line 11 time: 1.1205673217773E-5 ms after: 9.62 MB
Output for 5.2.3
before: 9.62 MB Warning: Wrong parameter count for debug_backtrace() in /in/hWbBN on line 11 time: 1.0013580322266E-5 ms after: 9.62 MB
Output for 5.2.2
before: 9.62 MB Warning: Wrong parameter count for debug_backtrace() in /in/hWbBN on line 11 time: 9.0599060058594E-6 ms after: 9.62 MB
Output for 5.2.1
before: 9.62 MB Warning: Wrong parameter count for debug_backtrace() in /in/hWbBN on line 11 time: 1.0967254638672E-05 ms after: 9.62 MB
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/hWbBN 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/hWbBN 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/hWbBN 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/hWbBN on line 9