note 95486 deleted from language.types by danbrown

From: Date: Tue, 05 Jan 2010 19:13:34 +0000
Subject: note 95486 deleted from language.types by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164668@lists.php.net to get a copy of this message
Note Submitter: Wes ---- Jeffrey, Note that using PHP's functions gettype() and get_class() are also useful for deteriming what your are dealing with. <?php class Point { public $x = 0; public $y = 0; } ?> Now, let's figure out what we just created. <?php $point = new Point(); if(gettype($point) == 'object') { echo 'This is a PHP object of type ' . get_class($point); } else { echo 'This is a PHP ' . gettype($point); } ?> Output: This is a PHP object of type Point

« previous php.notes (#164668) next »