3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BaseItem { } abstract class BaseCollection { abstract function test(BaseItem $base); } class RealItem { } class RealCollection extends BaseCollection { function test(RealItem $real) { } }
Output for 5.4.0 - 5.4.30
Fatal error: Declaration of RealCollection::test() must be compatible with BaseCollection::test(BaseItem $base) in /in/jc4Kq on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Fatal error: Declaration of RealCollection::test() must be compatible with that of BaseCollection::test() in /in/jc4Kq on line 4
Process exited with code 255.

preferences:
188.26 ms | 1386 KiB | 67 Q