Reply to Re: Code readability vs. execution time

Your name:

Reply:


Posted by Michael Fesser on 09/04/07 10:22

..oO(Marijn)

>On 4 sep, 10:02, Toby A Inkster <usenet200...@tobyinkster.co.uk>
>wrote:
>> Marijn wrote:
>> > private function __getDatabaseConnection(){
>> > if (!$this->__databaseConnection) {
>> > $this->__databaseConnection = new DatabaseFactory();
>> > };
>> > return($this->__databaseConnection);
>> > }
>> > }
>>
>> I certainly prefer this.
>
>But because it's faster or..?

Not really, just shorter code. I also prefer this variant.

>> By the way, you shouldn't name your functions with a double-underscore.
>> Functions that start with a double-underscore are reserved for future use
>> as "magic" functions (e.g. __construct, __call, __get, __autoload, etc).
>
>I know it is for reserverd magic functions BUT this way i serarate
>public (no underscore) from (protected one underscore) from (private
>(two underscores)
>
>I really prefer a difference in my code for private and protected
>methods.

But why?

Micha

[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

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