PHP 7 added scalar type hints and then made them optional in a way that surprises people: without declare(strict_types=1) the engine coerces, so a function typed int happily accepts the string "7" and quietly turns it into 7. The declaration is per file, and it is the file making the call that decides.
function retries(int $n): int { return $n; }
// coercive mode — the default
retries('7'); // 7
retries('7abc'); // 7, plus a notice
// with declare(strict_types=1) at the top of the CALLING file
retries('7'); // TypeError
That direction catches everyone: adding the declaration to a library changes nothing about how callers pass arguments to it. Strict mode has to spread file by file through the application, starting at the entry points. Coercive mode is still an improvement over no hint at all — "7abc" at least warns — but it will not stop a null reaching a parameter that cannot take one.