3v4l.org

run code in 300+ PHP versions simultaneously
<?php // lint >= 8.4 namespace AbstractFinalHook; final class User { private string $private = 'mailto: example.org' { get => 'private:' . $this->private; } final public string $final = 'mailto: example.org' { get => 'final:' . $this->final; } final protected string $protected = 'mailto: example.org' { get => 'protected:' . $this->protected; } final private string $email = 'mailto: example.org' { get => 'mailto:' . $this->email; } function doFoo(): void { $u = new User; var_dump($u->private); var_dump($u->protected); var_dump($u->final); var_dump($u->email); unset($u->email); } }
Output for git.master_jit, git.master
Fatal error: Property cannot be both final and private in /in/5ZXOF on line 19 Stack trace: #0 {main}
Process exited with code 255.

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:
135.79 ms | 995 KiB | 7 Q