3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { var $boo; function Foo() { $this->boo = md5('foo'); } function go() { echo $this->boo . PHP_EOL; } } $a = new Foo(); $a->go(); var_dump(memory_get_peak_usage());
Output for 7.0.0 - 7.1.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constructor in /in/Jsqk6 on line 3 acbd18db4cc2f85cedef654fccc4a4d8 int(385096)
Output for 5.6.0 - 5.6.28
acbd18db4cc2f85cedef654fccc4a4d8 int(228592)
Output for 5.5.0 - 5.5.38
acbd18db4cc2f85cedef654fccc4a4d8 int(228584)
Output for 5.4.0 - 5.4.45
acbd18db4cc2f85cedef654fccc4a4d8 int(228448)
Output for 5.3.11 - 5.3.29
acbd18db4cc2f85cedef654fccc4a4d8 int(637520)
Output for 5.3.0 - 5.3.10
acbd18db4cc2f85cedef654fccc4a4d8 int(637216)
Output for 5.2.10 - 5.2.17
acbd18db4cc2f85cedef654fccc4a4d8 int(94504)
Output for 5.2.7 - 5.2.9
acbd18db4cc2f85cedef654fccc4a4d8 int(94584)
Output for 5.2.3 - 5.2.6
acbd18db4cc2f85cedef654fccc4a4d8 int(94904)
Output for 5.2.2
acbd18db4cc2f85cedef654fccc4a4d8 int(92616)
Output for 5.2.1
acbd18db4cc2f85cedef654fccc4a4d8 int(92560)
Output for 5.1.3 - 5.2.0
acbd18db4cc2f85cedef654fccc4a4d8 Fatal error: Call to undefined function memory_get_peak_usage() in /in/Jsqk6 on line 21
Process exited with code 255.
Output for 5.0.2 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Jsqk6 on line 5 acbd18db4cc2f85cedef654fccc4a4d8 Fatal error: Call to undefined function memory_get_peak_usage() in /in/Jsqk6 on line 21
Process exited with code 255.
Output for 5.0.0 - 5.0.1
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Jsqk6 on line 5 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Jsqk6 on line 14 acbd18db4cc2f85cedef654fccc4a4d8PHP_EOL Fatal error: Call to undefined function memory_get_peak_usage() in /in/Jsqk6 on line 21
Process exited with code 255.
Output for 4.4.5 - 4.4.9
acbd18db4cc2f85cedef654fccc4a4d8 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/Jsqk6 on line 21
Process exited with code 255.
Output for 4.3.10 - 4.4.4
acbd18db4cc2f85cedef654fccc4a4d8 Fatal error: Call to undefined function: memory_get_peak_usage() in /in/Jsqk6 on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Jsqk6 on line 14 acbd18db4cc2f85cedef654fccc4a4d8PHP_EOL Fatal error: Call to undefined function: memory_get_peak_usage() in /in/Jsqk6 on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Jsqk6 on line 14 acbd18db4cc2f85cedef654fccc4a4d8PHP_EOL Fatal error: Call to undefined function: memory_get_peak_usage() in /in/Jsqk6 on line 21