3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function __destruct() { echo 'destructed', PHP_EOL; } } $x = new C(); $fn = fn ($a, $b) => (($x = $a ** 2) + ($y = $b ** 2)) * ($x - $y); echo '- unsetting $x', PHP_EOL; unset($x); echo '- calling $fn', PHP_EOL; var_dump($fn(3, 2)); echo '- unsetting $fn', PHP_EOL; unset($fn); echo '- DONE.', PHP_EOL;
Output for git.master_jit, git.master, rfc.property-hooks
- unsetting $x - calling $fn int(65) - unsetting $fn destructed - DONE.

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:
55.68 ms | 405 KiB | 5 Q