You are here: Re: Calling a subclass's method « PHP Programming Language « IT news, forums, messages
Re: Calling a subclass's method

Posted by Jerry Stuckle on 06/14/06 16:45

Rik wrote:
> Jerry Stuckle wrote:
>
>>Yes, you should treat the array as private, even in PHP 4 where you
>>can't
>>declare it such. One of the purposes of OO is to hide implementation
>>details - such as your data members.
>>
>>The following (slightly modified from your previous post) works for
>>me on PHP 5.1.2:
>>
>><snip code>
>
>
> That's what I tried, but PHP4 has thsi to say about thes second ->:
> Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or
> ';'
>
> PHP5 indeed handles this with no problems.
>
> Maybe this has something to do with returning by reference?
>
> Grtz,

Don't know - haven't used PHP 4 for ages. But as Markus pointed out, you can
return the object by reference.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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