3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Request { public static function process(Request $foo) { // do something with our Request } } class BadgerRequest extends Request { public static function process(BadgerRequest $foo) { if (!($foo instanceof BadgerRequest)) { throw new \InvalidArgumentException('Expecting BadgerRequest'); } // do something with our BadgerRequest } }
Output for 7.0.0 - 7.2.9
Warning: Declaration of BadgerRequest::process(BadgerRequest $foo) should be compatible with Request::process(Request $foo) in /in/V8t00 on line 15
Output for hhvm-3.15.4 - 3.22.0
Output for 5.6.30
Strict Standards: Declaration of BadgerRequest::process() should be compatible with Request::process(Request $foo) in /in/V8t00 on line 15