thefortrees Posted July 16, 2007 Share Posted July 16, 2007 Hi all - Is there any way to check to see if an object is an instance of a specific class? For example, in Java there is an instanceof operator... if (myObject instanceof classThatCreatesObject) //do cool stuff here Thanks Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 16, 2007 Share Posted July 16, 2007 google's a wonderful thing: http://ca.php.net/is_a note that it's deprecated in favour of the instanceof operator in PHP 5, so take care to use the latter if you're on PHP 5. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.