3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const NAME = 'A'; public static function test() { $args = func_get_args( 'more', 'args'); echo static::NAME, " ".join(',', $args)." \n"; } } class B extends A { const NAME = 'B'; public static function test() { echo self::NAME, "\n"; forward_static_call(array('A', 'test')); forward_static_call( 'test', 'other', 'args'); } } B::test(); function test() { $args = func_get_args(); echo "C ".join(',', $args)." \n"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
B Fatal error: Uncaught ArgumentCountError: func_get_args() expects exactly 0 arguments, 2 given in /in/8TjAT:7 Stack trace: #0 /in/8TjAT(7): func_get_args('more', 'args') #1 [internal function]: A::test() #2 /in/8TjAT(18): forward_static_call(Array) #3 /in/8TjAT(23): B::test() #4 {main} thrown in /in/8TjAT on line 7
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:
51.72 ms | 401 KiB | 8 Q