PHP | is_object() Function Last Updated : 27 Apr, 2020 Comments Improve Suggest changes Like Article Like Report The is_object() function is an inbuilt function in PHP which is used to check whether the given value is an object or not. Syntax: bool is_object( mixed $var ) Parameters: This function accepts single parameter as mentioned above and described below: $var: It contains the value of variable that need to be check. Return Value: It returns TRUE if the value of variable is an object, FALSE otherwise. Program 1: php <?php // Create a class class GFG { public $data1; public $data2; public $data3; } // Create an object $obj = new GFG(); // Check the value of variable // is an object or not if(is_object($obj)) { echo "Object"; } else { echo "Not Object"; } ?> Output: Object Program 2: php <?php // Create a class class GFG { public $Geek_name = "Welcome to GeeksforGeeks"; } // Create the class name alias class_alias('GFG', 'GeeksforGeeks'); $obj1 = new GFG(); $obj2 = new GeeksforGeeks(); $obj3 = 'GeeksforGeeks'; var_dump(is_object($obj1)); var_dump(is_object($obj2)); var_dump(is_object($obj3)); ?> Output: bool(true) bool(true) bool(false) Reference: https://www.php.net/manual/en/function.is-object.php Comment More infoAdvertise with us Next Article PHP | is_object() Function A ashokjaiswal Follow Improve Article Tags : Web Technologies PHP PHP-function Similar Reads PHP isset() Function The isset() function in PHP checks whether a variable is declared and not NULL. It returns true if the variable exists and has a non-NULL value, and false otherwise, without modifying the variable. Syntaxbool isset( mixed $var [, mixed $... ] )Parameters: This function accept one or more parameter a 3 min read PHP is_long() Function The is_long() function is an inbuilt function in PHP that is used to check whether the given value is a long integer or not. Syntax: bool is_long(mixed $value) Parameters: This function accepts a single parameter $value that holds the value which needs to check for a long integer. Return Value: This 1 min read PHP | is_numeric() Function The is_numeric() function is an inbuilt function in PHP which is used to check whether a variable passed in function as a parameter is a number or a numeric string or not. The function returns a boolean value. Syntax: bool is_numeric ( $var ) Parameters: The function accepts a single parameter which 2 min read PHP | get_object_vars() Function The get_object_vars() function is an inbuilt function in PHP that is used to get the properties of the given object. When an object is made, it has some properties. An associative array of properties of the mentioned object is returned by the function. But if there is no property of the object, then 2 min read PHP | is_iterable() Function The is_iterable() function is an inbuilt function in PHP which is used to check whether the contents of a variable is an iterable value or not. Syntax: bool is_iterable( mixed $var ) Parameters: This function accepts single parameter as mentioned above and described below: $var: It contains the valu 1 min read PHP | is_a() function The is_a() is a built-in function in PHP and is used to check whether a given object is of a given class or not. It also checks if the given class is one of the parents of the given object or not. Syntax: boolean is_a($object, $class) Parameters: This function accepts two parameters as shown in the 2 min read PHP | is_link( ) Function The is_link() function in PHP used to check whether the specified file is a symbolic link or not. The path to the file is sent as a parameter to the is_link() function and it returns TRUE if the filename exists and is a symbolic link, otherwise it returns FALSE. Syntax: is_link(file) Parameters Used 2 min read PHP | is_null() Function The is_null() function is an inbuilt function in PHP which is used to find whether a variable is NULL or not. Syntax: boolean is_null ( $var ) Parameters: This function accepts a single parameter as shown in above syntax and described below. $var: Variable to check if it is NULL or not. Return value 2 min read PHP | is_dir( ) Function The is_dir() function in PHP used to check whether the specified file is a directory or not. The name of the file is sent as a parameter to the is_dir() function and it returns True if the file is a directory else it returns False. Syntax: is_dir($file) Parameters Used: The is_dir() function in PHP 1 min read PHP | stream_is_local() Function The stream_is_local() function is an inbuilt function in PHP which is used to check if a stream is a local stream or URL. Syntax: bool stream_is_local( $stream ) Parameters: This function accepts single parameter $stream, which is used to specify the stream to be check. Return Value: This function r 1 min read Like