3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = 'enum Mega {'; for ($i = 0; $i < 60_000; ++$i) { $code .= "case C{$i};"; } $code .= '}'; eval($code); unset($code); var_dump(memory_get_usage() / 1024 / 1024); for ($i = 0; $i < 60_000; ++$i) { constant("Mega::C{$i}"); } var_dump(memory_get_usage() / 1024 / 1024);
Output for git.master
float(15.843292236328125) float(14.04669189453125)
Output for git.master_jit
Fatal error: Out of memory (allocated 18874368 bytes) (tried to allocate 2621440 bytes) in /in/tOI8G(8) : eval()'d code on line 1 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.35 ms | 406 KiB | 5 Q