3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function usage() { if (function_exists('memory_get_usage')) { return memory_get_usage(true); } else { return '?'; } } echo usage()."\n"; $x = '.'; $a = ''; for ($i=0;$i<1000;$i++) $a = "$a$x"; echo usage()."\n"; unset($a,$x); echo usage()."\n";
Output for 7.0.0 - 7.1.0
2097152 2097152 2097152
Output for hhvm-3.13.2
302712 303992 302712
Output for hhvm-3.12.0
302552 303832 302552
Output for hhvm-3.10.0
300896 302176 300896
Output for 5.2.1 - 5.2.17, 5.4.0 - 5.6.28
262144 262144 262144
Output for 5.3.0 - 5.3.29
786432 786432 786432
Output for 4.3.0 - 5.2.0
? ? ?