ID: 7765
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Operating System: *
PHP Version: 4.0.3pl1
New Comment:

Thank you for keeping my feature request alive.

If I remember the discussions correctly, the implementation issue boiled down to the 
fact that PHP does not kill local variables at function or block termination (for 
speed reasons I believe).  In order to properly implement a destructor, the reference 
count for a variable needs to be decremented as the block scope of the declaration is 
exited.

I had suggested that this be a compile time flag, because correct program behavior is 
to do the reference decrements on block exit.  For those of us who want every possible 
tool to illuminate bugs (e.g. error_reporting( E_ALL)), this just adds another level 
of error checking on use of such constructs as global references on local variables, 
etc.

Again, perhaps this is not the main focus of PHP, but nevertheless I think it would be 
helpful option for developers who are writing huge OO sites with PHP.  It seems the 
incidence of such has increased greatly since I first made this report.

BTW, I do not know how my original comments got deleted.  I hope my memory of the 
issues is correct herein.  Apologies if I am mistaken.

Please take my comments constructively.



Previous Comments:
------------------------------------------------------------------------

[2001-10-21 19:10:19] [EMAIL PROTECTED]

Couldn't find the information about for which report 
this was duplicate. And this is feature reques.


------------------------------------------------------------------------

[2000-11-12 03:20:26] [EMAIL PROTECTED]



------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=7765&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to