3v4l.org

run code in 300+ PHP versions simultaneously
<?php class form { function st() { return "form"; } } class state { function st() { return "state"; } } interface aa { function run(form $form); } abstract class a implements aa{ function run(form $form, $a=null, $b=null) { var_dump($form->st()); echo "$a $b\n"; } } class b extends a { function run(form $form, state $state=null, $a=null, $b=null) { parent::run($form, $a, $b); var_dump($state->st()); } } $form = new form(); $state = new state(); $b = new b(); $b->run($form, $state, 1, 2);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Declaration of b::run(form $form, ?state $state = null, $a = null, $b = null) must be compatible with a::run(form $form, $a = null, $b = null) in /in/6p5Fe on line 24
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:
163.72 ms | 405 KiB | 5 Q