3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $memory = memory_get_peak_usage(TRUE); $foo = str_repeat('AB', 200); $foo .= str_repeat('CD', 200); $foo .= str_repeat('EF', 200); echo memory_get_peak_usage(TRUE) - $memory, PHP_EOL; $memory = memory_get_peak_usage(TRUE); $foo = implode('', [str_repeat('AB', 200), str_repeat('CD', 200), str_repeat('EF', 200]); echo memory_get_peak_usage(TRUE) - $memory, PHP_EOL;
based on dBoUE
Output for 7.0.0
Parse error: syntax error, unexpected ']', expecting ',' or ')' in /in/tdvIX on line 10
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Parse error: syntax error, unexpected ']' in /in/tdvIX on line 10
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/tdvIX on line 10
Process exited with code 255.