note 107310 added to reflectionclass.construct
| From: | gafisher at griasolutions dot com | Date: | Mon, 30 Jan 2012 01:23:34 +0000 |
| Subject: | note 107310 added to reflectionclass.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185789@lists.php.net to get a copy of this message | ||
Running the following code on Windows Vista (I know, I know), PHP 5.3.9, the ReflectionClass
constructor actually throws a ReflectionException when the desired class cannot be instantiated:
<?php
try {
$ReflectedClass = new ReflectionClass('NonExist');
} catch (LogicException $Exception) {
die('Not gonna make it in here...');
} catch (ReflectionException $Exception) {
die('Your class does not exist!');
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 216.13.220.99
----
Manual Page -- http://www.php.net/manual/en/reflectionclass.construct.php
Edit -- https://master.php.net/note/edit/107310
Del: integrated -- https://master.php.net/note/delete/107310/integrated
Del: useless -- https://master.php.net/note/delete/107310/useless
Del: bad code -- https://master.php.net/note/delete/107310/bad+code
Del: spam -- https://master.php.net/note/delete/107310/spam
Del: non-english -- https://master.php.net/note/delete/107310/non-english
Del: in docs -- https://master.php.net/note/delete/107310/in+docs
Del: other reasons-- https://master.php.net/note/delete/107310
Reject -- https://master.php.net/note/reject/107310
Search -- https://master.php.net/manage/user-notes.php