3v4l.org

run code in 500+ PHP versions simultaneously
<?php $i = 0; function funsimple() { global $i; if (($i++ % 2_000) === 0) { var_dump($i); } funsimple(); } function fun() { array_map(function ($str) { global $i; if (($i++ % 2_000) === 0) { var_dump($i); } fun(); }, ['x']); } $fx = function () use (&$fx, &$i) { array_map(function ($str) use ($fx, &$i) { if (($i++ % 2_000) === 0) { var_dump($i); } $fx(); }, ['x']); }; // funsimple(); // this produces correctly OOM error // this produces segfault fun(); // $fx(); // using anonymous function, the behaviour is the same

Abusive script

This script was stopped while abusing our resources

Output for rfc.property-hooks
int(1) int(2001) int(4001) int(6001) int(8001) int(10001) int(12001) Fatal error: Out of memory (allocated 27262976 bytes) (tried to allocate 20480 bytes) in /in/jJD62 on line 15 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:
60.85 ms | 1590 KiB | 4 Q