It's best to explain by an example.
I look for a function "theFunctionILookFor" that will make the code work.
$myClassName = "someName";
$parentOrInterfaceName = "someParent";
if ( theFunctionILookFor ($myClassName)) echo "is parrent";
Looks like this is my answer:
It can accept both parameters as strings