3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $val = 'Foo'; public static function huh() { $class = new ReflectionClass(get_called_class()); echo $class->getStaticPropertyValue('foo'); } } class Bar extends Foo { public static $val = 'bar'; } Foo::huh(); Bar::huh();
Output for git.master_jit, git.master, rfc.property-hooks
Fatal error: Uncaught ReflectionException: Property Foo::$foo does not exist in /in/cA5YR:6 Stack trace: #0 /in/cA5YR(6): ReflectionClass->getStaticPropertyValue('foo') #1 /in/cA5YR(13): Foo::huh() #2 {main} thrown in /in/cA5YR on line 6
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:
53.44 ms | 401 KiB | 8 Q