title: Dynamic type checking in PHP
body: <p>I'm writing some code in PHP, and I'd like to do something a little different if the variable is a string, or an instance of a certain class (or derived!), but the only casting I could find references for online performs an explicit static cast, rather than a dynamic cast. Is it possible to check the type of a given variable at runtime and compare it?</p>