3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C{ public const SOME_CONST="SOME_CONST_VAL"; public $some_not_const = "some_not_const"; function f(){ /*legal*/ return "blah blah {$this->some_not_const} blah blah"; /*illegal*/ return "blah blah {$this::SOME_CONST} blah blah"; } }
Output for git.master_jit, git.master, rfc.literals
Parse error: syntax error, unexpected token "}", expecting "->" or "?->" or "{" or "[" in /in/W8Z7M on line 8
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:
11.89 ms | 455 KiB | 5 Q