<?php
class Provider {
public function boot(ArgumentType $x)
{
return;
}
}
class ProviderB extends Provider {
public function boot(ArgumentType $x)
{
return 'yay';
}
}
$f = new ProviderB;
$f->boot(1, 2, 3);
Fatal error: Uncaught TypeError: ProviderB::boot(): Argument #1 ($x) must be of type ArgumentType, int given, called in /in/PTur5 on line 25 and defined in /in/PTur5:17
Stack trace:
#0 /in/PTur5(25): ProviderB->boot(1, 2, 3)
#1 {main}
thrown in /in/PTur5 on line 17
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Uncaught TypeError: ProviderB::boot(): Argument #1 ($x) must be of type ArgumentType, int given, called in /in/PTur5 on line 25 and defined in /in/PTur5:17
Stack trace:
#0 /in/PTur5(25): ProviderB->boot(1, 2, 3)
#1 {main}
thrown in /in/PTur5 on line 17
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught TypeError: Argument 1 passed to ProviderB::boot() must be an instance of ArgumentType, int given, called in /in/PTur5 on line 25 and defined in /in/PTur5:17
Stack trace:
#0 /in/PTur5(25): ProviderB->boot(1, 2, 3)
#1 {main}
thrown in /in/PTur5 on line 17
Process exited with code 255.
Fatal error: Uncaught TypeError: Argument 1 passed to ProviderB::boot() must be an instance of ArgumentType, integer given, called in /in/PTur5 on line 25 and defined in /in/PTur5:17
Stack trace:
#0 /in/PTur5(25): ProviderB->boot(1, 2, 3)
#1 {main}
thrown in /in/PTur5 on line 17
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Catchable fatal error: Argument 1 passed to ProviderB::boot() must be an instance of ArgumentType, integer given, called in /in/PTur5 on line 25 and defined in /in/PTur5 on line 17
Process exited with code 255.