3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 11; $bar = 12; //optimal: memory used once $foo = $foo ^ $bar; $bar = $foo ^ $bar; $foo = $foo ^ $bar; var_dump($foo, $bar); echo memory_get_peak_usage(); $foo = 11; $bar = 12; //readable: $baz = $foo; $foo = $bar; $bar = $baz; // var_dump($foo, $bar); echo memory_get_peak_usage();
Output for git.master
int(12) int(11) 422616int(12) int(11) 422616
Output for git.master_jit
int(12) int(11) 382496int(12) int(11) 382496
Output for rfc.property-hooks
int(12) int(11) 422584int(12) int(11) 422584

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