3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = []; /* record T(int $x, int $y); */ readonly class T { public function __construct(public int $x, public int $y) {}} // emulate a record $t = new T(1,2); for($x = 0; $x <= 100_000; $x++) $arr[] = $t /* &T(1,2) */ ; echo "Current memory usage: " . (memory_get_usage() / 1024) . " KB\n"; echo "Peak memory usage: " . (memory_get_peak_usage() / 1024) . " KB\n";
Output for git.master_jit
Current memory usage: 2392.703125 KB Peak memory usage: 2392.8359375 KB
Output for git.master
Current memory usage: 2432.3203125 KB Peak memory usage: 2432.453125 KB

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:
27.82 ms | 406 KiB | 5 Q