3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $foo; } $foo = new Foo(); $foo->foo = 'foo'; var_dump(memory_get_usage());
Output for 7.0.0 - 7.1.0
int(346744)
Output for hhvm-3.10.0 - 3.12.0
int(2097152)
Output for 5.6.8 - 5.6.28
int(218408)
Output for 5.5.24 - 5.5.35
int(218400)
Output for 5.4.10 - 5.4.45
int(218920)
Output for 5.4.0 - 5.4.9
int(218392)
Output for 5.3.11 - 5.3.29
int(621512)
Output for 5.3.0 - 5.3.10
int(621208)
Output for 5.2.10 - 5.2.17
int(79112)
Output for 5.2.7 - 5.2.9
int(79648)
Output for 5.2.3 - 5.2.6
int(79968)
Output for 5.2.1 - 5.2.2
int(77864)
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/5h5Sf on line 11
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/5h5Sf on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/5h5Sf on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/5h5Sf on line 5
Process exited with code 255.