3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Rofl\Quack{ const BAR = "bar"; } namespace Bar\Qux{ use const \Rofl\Quack\BAR; const FOO = 1; function whatever( int $p0 = FOO, int $p1 = BAR, string $p2 = \Rofl\Quack\BAR . 'lit' ){} } namespace{ $RF = new ReflectionFunction(\Bar\Qux\whatever::CLASS); var_dump($RF->getParameters()[0]->getDefaultValueConstantName()); var_dump($RF->getParameters()[1]->getDefaultValueConstantName()); var_dump($RF->getParameters()[2]->getDefaultValueConstantName()); }
Output for git.master, git.master_jit, rfc.property-hooks
string(11) "Bar\Qux\FOO" string(14) "Rofl\Quack\BAR" NULL

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