You are here: Re: unset($this) or maybe unset(&$this) « PHP Programming Language « IT news, forums, messages
Re: unset($this) or maybe unset(&$this)

Posted by Oli Filth on 02/24/06 03:15

Tony Marston said the following on 23/02/2006 23:49:
> PHP is not C++, so expecting the same behaviour from two different languages
> is just being too optimistic.

I'm not; I was just disputing the assertion that an object is a
collection of code and variables.


> It is not wise to delete an object while you
> are still inside it, nor is it wise to overwrite it with something else
> while you are still inside it. Why? Because it buggers up any references to
> the original object which may still exist in other places.

In most situations, yes. But the whole point of having an object delete
itself (in OO languages in general) is in situations where there are
intentionally no external pointers/references to it. In PHP, I can't
see how such a situation could exist, though.

The point is moot, however, because the language doesn't allow it...


--
Oli

 

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

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