YOu'd be surprised sometimes ;-) Anyway, exceptions thrown during autoload are ignored. Autoloading is the last resort for the engine to find a class. If the class can not be loaded (file isn't there, exception, autoloader doesn't load a file), then you get the fatal error. This is correct behavior.
Yes, I read that exception can not be catched from autoload, but one thing was which confused me in this case:

<?php
define('error', oops_i_left_the_quotes);
class foo {
}
?>
In this case I got bar not found.

<?php
class foo {
        const error = oops_i_left_the_quotes;
}
?>
In this case I got the exception.

So the difference is that class level constants are creating after the autoload?


Best Regards,
Felhő

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to