3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Provider { public function boot(ArgumentType $x) { return; } } class ProviderB extends Provider { public function boot(int $x) { return 'yay'; } } $f = new ProviderB; $f->boot(1, 2, 3);
based on PTur5
Output for 7.0.0 - 7.2.0
Warning: Declaration of ProviderB::boot(int $x) should be compatible with Provider::boot(ArgumentType $x) in /in/thR1h on line 22
Output for 5.4.11 - 5.6.28
Strict Standards: Declaration of ProviderB::boot() should be compatible with Provider::boot(ArgumentType $x) in /in/thR1h on line 22 Catchable fatal error: Argument 1 passed to ProviderB::boot() must be an instance of int, integer given, called in /in/thR1h on line 25 and defined in /in/thR1h on line 17
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Strict Standards: Declaration of ProviderB::boot() should be compatible with that of Provider::boot() in /in/thR1h on line 22 Catchable fatal error: Argument 1 passed to ProviderB::boot() must be an instance of int, integer given, called in /in/thR1h on line 25 and defined in /in/thR1h on line 17
Process exited with code 255.