__autoload vs include family

jineAssesynop

New Member
I've discovered the __autoload function today and after reading the official manual page of this function there's a point I don't get at all.What's clearly the difference between using __autoload() and let's say require_once?because it looks autoload is the new fashion way of doing the required includes but to me it's far better to use require_once instead. Hence, __autoload has to be defined into all the php files which means writing its code down there, if I put ALL my includes/require_once/...etc into one file let's call it main_header.php then all I'll need to do in my web app files is write one line of code:\[code\]<?php require_once('main_header.php'); ?> \[/code\]Am I wrong somewhere?
 
Top