3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This is only an example, the numbers below will // differ depending on your system echo memory_get_usage() . "\n"; // 36640 $a = str_repeat("Hello", 4242); echo memory_get_usage() . "\n"; // 57960 unset($a); echo memory_get_usage() . "\n"; // 36744
Output for 8.0.3
386336 410944 386368
Output for 7.4.0 - 7.4.2
386640 411248 386672
Output for 7.3.0 - 7.3.14
386560 411168 386592
Output for 7.2.0 - 7.2.27
382712 407320 382744
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
346040 370648 346072
Output for 5.6.0 - 5.6.40
216776 238192 216824
Output for 5.5.0 - 5.5.38
216776 238184 216808
Output for 5.4.10 - 5.4.45
217296 238704 217328
Output for 5.4.0 - 5.4.9
216768 238176 216800
Output for 5.3.11 - 5.3.29
619560 640968 619592
Output for 5.3.0 - 5.3.10
619256 640664 619288
Output for 5.2.10 - 5.2.17
77776 99176 77808
Output for 5.2.7 - 5.2.9
78144 99616 78480
Output for 5.2.3 - 5.2.6
78464 99936 78800
Output for 5.2.2
76392 97800 76664
Output for 5.2.1
76392 97800 76568
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6, 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/hFZe9 on line 6
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/hFZe9 on line 14
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/hFZe9 on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/hFZe9 on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/hFZe9 on line 6

preferences:
189.9 ms | 401 KiB | 329 Q