For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > January 2005 > Re: [PHP-DOC] cvs: phpdoc /en/language/oop5 basic.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DOC] cvs: phpdoc /en/language/oop5 basic.xml
Sean Coates

2005-01-29, 3:56 pm

I don't particularly like that this is in the Basics section.. but I'm
not sure where else to put it..

It fits much nicer into the PHP 4 OOP section (but it also applies to
PHP 5, so I put it in both).

Suggestions?

S

Sean Coates wrote:
> sean Sat Jan 29 09:43:56 2005 EDT
>
> Modified files:
> /phpdoc/en/language/oop5 basic.xml
> Log:
> document seemingly-odd $this behaviour
>

Gabor Hojtsy

2005-01-29, 3:56 pm

> I don't particularly like that this is in the Basics section.. but I'm
> not sure where else to put it..
>
> It fits much nicer into the PHP 4 OOP section (but it also applies to
> PHP 5, so I put it in both).
>
> Suggestions?


It is still a problem in PHP 5? Huh.

Goba
Sean Coates

2005-01-29, 3:56 pm

> It is still a problem in PHP 5? Huh.

I don't know if I'd consider it a problem, but yes, it still happens in
PHP 5.

I discovered this while working on Mail_Mime -- the only way I could
come up with to detect if a method is being called statically (without
hacking a special property into $object) was:

// determine if this method has been called statically
$isStatic = !(isset($this) && get_class($this) == __CLASS__);

.... which is pretty hacky, but it works. I was tempted to drop this into
the note, but held back (-:

S
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com