3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $range = range(0, 2000000); $var = join('', $range); var_dump(strlen($var)); $$var = 4; var_dump($$var);
based on YhfGd
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 67108872 bytes) in /in/WSuL0 on line 2
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
int(12888897) int(4)
Output for 5.3.9 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/WSuL0 on line 2
Process exited with code 255.