September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool is_object(mixed value) Tests whether a value is an object.
Returns:
TRUE if the value is an object; FALSE otherwise
Description:
is_object() checks whether value is an object. If so, the function returns TRUE. If not, FALSE is returned.
Availability:
UNIX, Windows
Version:
3+, 4+
See also:
gettype()
Examples:
// Define a class to use in testing
class test {}
// Instantiate the class
$test = new test ();
is_object ($test)
or die ('Variable $test is not a class');
|
<pre> <?php // Define an empty class to use in testing class test {} $test = new test (); // Make a list of values to test $values = array ( 'new test ()' => new test (), 'TRUE' ... |
Read now
Unlock full access