__autoload() in PHP4

From: Date: Wed, 28 Jan 2004 14:44:01 +0000
Subject: __autoload() in PHP4
Groups: php.general 
Request: Send a blank email to php-general+get-176053@lists.php.net to get a copy of this message
Good morning fella, Is there something like __autoload() of PHP5 in PHP4? After using PHP5 for a month, I just can't stand writing those never-ending includes and requires. Any ideas how to simulate an __autoload()? I am not afraid of a little overhead. For those who don't know - if PHP does not have some class defined, it looks for __autoload() function defined by user and checks for class definition after executing the function. If the class is then defined, PHP goes on parsing as nothing had ever happened, but if the class is not found by that time PHP sends an error message. -- Best regards, Pietuka Tevi gaida Persijas princis Tikssanaas vieta un aizrautiiga laika pavadiissana http://games.inbox.lv

« previous php.general (#176053) next »