Edit report at https://bugs.php.net/bug.php?id=52339&edit=1
ID: 52339
Comment by: matthew dot bonner at gmail dot com
Reported by: dangerous dot ben at gmail dot com
Summary: SPL autoloader breaks class_exists()
Status: Re-Opened
Type: Bug
Package: SPL related
Operating System: any (debian)
PHP Version: 5.3.3RC2
Block user comment: N
Private report: N
New Comment:
It shouldn't throw an exception or cause an error. This is exactly why people move to C#
because we don't have to put up with any of this bullshit for 5 years. An exception should be
thrown when something happens that is not expected to happen, you expect class_exists to return
false when the class does not exist, it is bonkers to think that we want to be wasting our lives
catching stupid exceptions that should not be thrown in the first place, either that or catch the
bloody exception in the body of the class_exists function for crying out loud. How hard is it
really?
Previous Comments:
------------------------------------------------------------------------
[2015-09-08 20:22:20] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=337786
Log: spl_autoload() may throw LogicException (related to #52339)
------------------------------------------------------------------------
[2015-09-08 20:14:46] cmb@php.net
> My understanding of the underlying code is that it generates an> error in this case. Perhaps it should generate an exception,> which can be caught an handled.
The code already throws an exception, see <https://3v4l.org/AaURG>.
------------------------------------------------------------------------
[2014-10-13 10:33:31] aden at fraserjilani dot com
v5.5.9 - still broken.
------------------------------------------------------------------------
[2014-10-08 06:51:01] john dot fragkoulis at gmail dot com
v5.5.3 still broken
------------------------------------------------------------------------
[2014-01-13 12:34:02] matthew dot bonner at gmail dot com
Still broke in 5.4 and 5.5 3 years on!
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=52339
--
Edit this bug report at https://bugs.php.net/bug.php?id=52339&edit=1