3v4l.org

run code in 300+ PHP versions simultaneously
<?php const X = __METHOD__; var_dump(X); class A { const X = __METHOD__; } var_dump(A::X); function doB() { class B { const X = __METHOD__; } } doB(); var_dump(B::X); function c() { return __METHOD__; } var_dump(c()); $d = function() { return __METHOD__; }; var_dump($d()); function e() { return function() { return __METHOD__; }; } var_dump(e()()); class F { static function foo() { return function() { return __METHOD__; }; } } var_dump(F::foo()());
Output for git.master, git.master_jit, rfc.property-hooks
string(0) "" string(0) "" string(0) "" string(1) "c" string(9) "{closure}" string(9) "{closure}" string(9) "{closure}"

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:
42.23 ms | 1508 KiB | 4 Q