Oh! Thanks Nikita. I did not know that the exceptions in the engine already accepted. But in fairness, in PHP "A $a" typehint does not make sure that "$a instanceof A " returns true. You can change "test" fucntion in code form my first message to
function test(A $a) { var_dump($a instanceof A); } Output will be "bool(false)". Today I will try to recompile my PHP7, but with the exception of the engine and try to reproduce this behavior. I have a view that it will be possible to make.