3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface test { protected function test(); } class a implements test { protected function test() { echo "testa"; } } class b extends a { protected function test() { echo "testb"; } } $b = new b(); $b->test();
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.24
Fatal error: Access type for interface method test::test() must be omitted in /in/i4G8g on line 2
Process exited with code 255.

preferences:
188.09 ms | 1399 KiB | 62 Q