3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $name; public function __construct($name) { $this->name = $name; } public function __toString() { return "[Foo: $this->name]"; } } $a = new Foo("Lorem"); echo $a, "\n"; $s = $a; $s .= "some string"; echo $s, "\n"; $s = $a; $s .= new Foo("Ipsum"); echo $s, "\n"; $s = "some string"; $s .= $a; echo $s, "\n";
Output for git.master, git.master_jit, rfc.property-hooks
[Foo: Lorem] [Foo: Lorem]some string [Foo: Lorem][Foo: Ipsum] some string[Foo: Lorem]

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