3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends \stdClass { public int $i = 42; } $holder = []; for ($i = 0; $i < 10000; $i++) { $holder[] = new A; } var_dump(memory_get_usage()); foreach ($holder as $obj) { } var_dump(memory_get_usage()); $unserialized_holder = []; foreach ($holder as $obj) { $unserialized_holder[] = \unserialize(\serialize($obj)); } unset($holder); var_dump(memory_get_usage());
Output for git.master
int(1338176) int(1338208) int(5229336)
Output for git.master_jit
int(1297824) int(1297856) int(5188984)
Output for rfc.property-hooks
int(1338144) int(1338176) int(5229304)

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:
26.58 ms | 407 KiB | 5 Q