3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024); // allocate a large byte string of around 5 MB $a = str_repeat("0", 5 * 1024 * 1024); echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024); // setting the memory limit lower than the current is accepted ini_set("memory_limit", "3M"); echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024); // further allocation beyond the limit $b = str_repeat("0", 5 * 1024 * 1024); echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024);
Output for git.master, git.master_jit, rfc.literals
2.0MB 7.0MB Warning: Failed to set memory limit to 3145728 bytes (Current memory usage is 7344128 bytes) in /in/egq60 on line 9 7.0MB 12.0MB

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:
13.6 ms | 459 KiB | 5 Q