note 48255 deleted from function.gettype by crell

From: Date: Mon, 04 Apr 2022 16:57:30 +0000
Subject: note 48255 deleted from function.gettype by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218120@lists.php.net to get a copy of this message
Note Submitter: matt at appstate ---- Here is something that had me stumped with regards to gettype and is_object. Gettype will report an incomplete object as such, whereas is_object will return FALSE. <?php if (!is_object($incomplete_obj)) { echo 'This variable is not an object, it is a/an ' . gettype($incomplete_obj); } ?> Will print: This variable is not an object, it is a/an object

« previous php.notes (#218120) next »