3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Immutable { private $super_secret = 5; } $immutable = new Immutable(); var_dump($immutable); $immutable = (function () { $this->super_secret = 10; return $this; })->call($immutable); var_dump($immutable);
Output for git.master, git.master_jit, rfc.property-hooks
object(Immutable)#1 (1) { ["super_secret":"Immutable":private]=> int(5) } object(Immutable)#1 (1) { ["super_secret":"Immutable":private]=> int(10) }

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