note 85977 deleted from function.include by peehaa

From: Date: Fri, 09 Dec 2016 22:40:38 +0000
Subject: note 85977 deleted from function.include by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208371@lists.php.net to get a copy of this message
Note Submitter: AntonioCS at gmail dot com ---- Include and Require will call the __autoload function if the file that is being called extends some other class Example Code: File teste.php <?php class teste extends motherclass { public function __construct() { parent::__construct(); } } ?> File example.php <?php require("teste.php"); if (class_exists("motherclass")) echo "It exists"; ?> You will be given the output: It exists I think the __autoload function should be called when I instantiate the teste class not when I include/require the file.

« previous php.notes (#208371) next »