3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create() { $a = new stdClass(); $b = new stdClass(); $b->a = $a; // $b->cb = function() use ($a) { // }; $a->b = $b; return $a; } echo number_format(memory_get_peak_usage() / 1000000, 2, '.', ' '), " MB\n"; for ($i = 0; $i < 1000; ++$i) { create(); // $a->b = new ArrayObject(); } gc_collect_cycles(); echo number_format(memory_get_peak_usage() / 1000000, 2, '.', ' '), " MB\n";
Output for git.master, rfc.property-hooks
0.43 MB 1.23 MB
Output for git.master_jit
0.38 MB 1.19 MB

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:
43.09 ms | 401 KiB | 8 Q