Issue Task Closed

#50494Check leightweight cases before class_exists if possible

Stefan Neufeind 07/27/13, 22:22 updated 10/02/18, 12:12

Description

While reviewing a fix for #50217 it appeared that calling class_exists triggers autoloading. If other checks like “in_array” can be done first that is more leightweight than calling class_exists and potentially causing multiple autoloaders (without success) to search for files.

In FAL for example a drivername is first checked for being a class and if not being a class it is tried to be expanded (with namespacing etc.) using the driver-registry. As such the classname “Local” (for LocalDriver) is first tried, which of cause does not exist in this generic form.

Reviews 1