PHP is_object() function

Description

is_object(value) returns true if value is an object.

Syntax

is_object(value)

Parameter

  • value is the variable being type checked.

Return

Returns true if value is an object.

Example

Is it an object.


<?php/*from  w ww . j a  va  2 s . c  o  m*/
$values = array(2, "2", 2.5, "2.5", null, true);

var_dump(is_object($values));


?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions