Reply to Re: Operator Overloading

Your name:

Reply:


Posted by ~john on 07/14/06 17:59

deciacco wrote:

> Any other suggestions?
> ( I was thinking of having a custom method called echo in myobject so
> one could do echo myobject->echo(); This is not as clean....)


Richard is correct define a function called __toString() in your class
without whatever class variables you want to print off. Notice that
there are 2 underscores on __toString()

You might want to consider an excellent book called PHP 5 Objects,
Patterns, and Practice... I'm reading it now and it covers many of
PHP's advancent features including OO and design patterns.

~john

[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

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