TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   need a built in function in php which work same as isinstance function of python (http://www.talkphp.com/absolute-beginners/4613-need-built-function-php-work-same-isinstance-function-python.html)

tech 06-25-2009 12:59 PM

need a built in function in php which work same as isinstance function of python
 
dear all..
any one please tell me which function in php work same as isinstance function of php and how to use it.

isinstance(object, classinfo):
Return true if the object argument is an instance of the classinfo argument, or of a (direct or indirect) subclass thereof. Also return true if classinfo is a type object and object is an object of that type.
thanks

Salathe 06-25-2009 01:22 PM

You can use the instanceof operator and there is also the is_a function.


All times are GMT. The time now is 01:19 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0