Article:
  Why PHP 5 Rocks!
Subject:   interfaces &__autoload
Date:   2005-01-22 12:27:15
From:   hooda
I have been told that if I use interfaces in PHP 5 that it is important to define the class before you instantiate the object.


Does this mean that I will run into trouble if I use __autoload to load my class definitions when I instantiate an object?

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • interfaces &__autoload
    2006-07-06 00:51:44  filip_gg [View]

    You can check on your interface with this function right here:

    interface_exists(string $interface, bool $autoload=TRUE)

    Returns TRUE if $interface is
    defined in the current script.
    Unless $autoload is set to
    FALSE, this function will
    attempt to invoke
    __autoload() (if defined)