note 49425 added to language.oop5.autoload

From: Date: Thu, 27 Jan 2005 14:31:22 +0000
Subject: note 49425 added to language.oop5.autoload
Groups: php.notes 
Request: Send a blank email to php-notes+get-84074@lists.php.net to get a copy of this message
If you want to throw an exception if a class isn't defined yet, use class_exists (): <?php // See if the class is defined if (!class_exists ($className, false)) { throw new Exception ("Class $className is not defined."); } ?> The second parameter indicates whether or not the __autoload () function should be called before checking for the class's existence. ---- Manual Page -- http://www.php.net/manual/en/language.oop5.autoload.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49425 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49425&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49425&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49425&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49425&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49425&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49425&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84074) next »