You are here: Re: php 4 Classess "__get" use clarification. Only 1 "__get" per class? « PHP Language « IT news, forums, messages
Re: php 4 Classess "__get" use clarification. Only 1 "__get" per class?

Posted by Hendri Kurniawan on 05/07/07 22:06

Michael Fesser wrote:
> .oO(cluthz)
>
>> "Ok well thanks for that. I was going from the text in PHP and MYSQL Web
>> Development. Chapter 6 talks about _get and __set and at the end of the talk
>> it mentiosn features specicifcally avaialble in PHP 5 (so I assumed the
>> previously mentioned was available on version 4).
>>
>> Anyway, maybe then I should forget about OO for php 4 then.
>
> Yes, more or less. Objects in PHP4 are just arrays with some associated
> functions, that's pretty much all about them. In PHP5 they are something
> completely different, which comes much closer to what you can call OOP.
> Still not perfect, but quite usable.
>
> Try to upgrade if possible.
>
> Micha

I take a different view of OOP for PHP4 than Michael Fesser.
Although it's OOP is less developed than PHP5, IMHO you are still able
to take advantage of it, and apply OOP concept using PHP4.

To port PHP4 OOP code to PHP5 does not take much. PHP5 will run PHP4
"legacy" code without a hitch most of the time. Just a special mention
to constructor within PHP4 is different of those of PHP5.

Hendri Kurniawan

 

Navigation:

[Reply to this 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

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