spl_autoload

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thomas Mlynarczyk

    #1

    spl_autoload

    Hi,

    Having experimented with the spl_autoload functions, the following questions
    came to my mind:

    1) In which order are the possible path/extension combinations tried by
    spl_autoload()? It seems that "myclass.ph p" is always found before
    "myclass.mod.ph p", regardless of the order in which extensions or include
    paths are given.

    2) Which PHP functions invoke autoload? is_subclass_of( ) seems to invoke it
    for both parameters, even though it doesn't seem to make sense for the
    second one.

    3) If a class is not found, spl_autoload throws a LogicException. This is,
    IMHO, a bit stupid for functions like class_exists(). Can this behaviour be
    controlled somehow?

    4) Having spl_autoload, is __autoload obsolete?

    Greetings,
    Thomas


Working...