3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Concrete { protected function foo(); } class Bar { } abstract class AbsConcrete implements Concrete { abstract protected function foo(); } class Customer extends AbsConcrete { public function init() { echo "init\n"; } public function foo( Bar $me = null, Bar $lala = null ) { echo "foo\n"; } } $customer = new Customer; $customer->init(); $customer->foo( new Bar, new Bar );
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.21
Fatal error: Access type for interface method Concrete::foo() must be omitted in /in/gDa2F on line 3
Process exited with code 255.

preferences:
180.9 ms | 1395 KiB | 57 Q