Reply to Re: [PHP] PHP 5 Question about OO

Your name:

Reply:


Posted by GamblerZG on 06/02/05 19:46

Maybe it's just me, but the core concept of __autoload() seems to be
broken to me. Moreover, every proposed solution I've heard about is
totally inside the box. I would do it like this:
1) Define $_AUTOLOAD superglobal.
2) If I need SomeClass to be autoloaded I write this:
$_AUTOLOAD['SomeClass'] = 'some/dir/some_classs.php';
3) If I care, I could check whether $_AUTOLOAD['SomeClass'] is already
set and generate an error.

This would mimic Java behaviour (it's about competing with Java, is it?)
without creating artificial headache for programmers. But wait! What do
I know? This will cbreak BC; moreover, BC will be broken by this. Forget
I said something.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация