3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function test($a, $b = 'test') { } } class bar extends foo { public function test($a, $b = 'test', $c = null) { } } class baz extends foo { public function test($a, $b = 'test', $c) { } } class bazbaz extends foo { public function test($a, $b = null, $c = null) { } } (new foo)->test(1, 2); (new bar)->test(1, 2); (new baz)->test(1, 2); (new bazbaz)->test(1, 2);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Optional parameter $b declared before required parameter $c is implicitly treated as a required parameter in /in/RmiOS on line 19 Fatal error: Declaration of baz::test($a, $b, $c) must be compatible with foo::test($a, $b = 'test') in /in/RmiOS on line 19
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.79 ms | 401 KiB | 8 Q