3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content-type:text/plain; charset=utf-8"); error_reporting(E_ALL); ini_set('display_errors', 1); class A { public function f(array $array) { var_dump($array); } } class B extends A { public function f(A $a, array $b) { var_dump($b); } } $a = new A(); $a->f([1, 2, 3]); $b = new B(); $b->f($a, []);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Declaration of B::f(A $a, array $b) must be compatible with A::f(array $array) in /in/lpJfU on line 18
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:
40.01 ms | 401 KiB | 8 Q