PHP doesn't have loose typing anymore, if you make a function parameter with a specific type:
function test(bool $param) {}
You will get an runtime error if you call it with wrong type: Fatal error: Uncaught TypeError: test(): Argument #1 ($param) must be of type boolean
However generics are probably costly to typecheck runtime? I haven't studied the reason why there is not generics planned.