3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo; } $foo = new Foo(); $foo->foo = 'foo'; var_dump(memory_get_usage());
Output for 7.4.0 - 7.4.1
int(387352)
Output for 7.3.0 - 7.3.13
int(387304)
Output for 7.2.0 - 7.2.26
int(383408)
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
int(346672)
Output for 5.6.0 - 5.6.40
int(218224)
Output for 5.5.0 - 5.5.38
int(218216)
Output for 5.4.10 - 5.4.45
int(218736)
Output for 5.4.0 - 5.4.9
int(218208)
Output for 5.3.11 - 5.3.29
int(620968)
Output for 5.3.0 - 5.3.10
int(620664)
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.0.5, 5.1.0 - 5.1.6, 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.3.11, 4.4.0 - 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.

preferences:
190.77 ms | 401 KiB | 325 Q