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

ZE2 has destructors.


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

[2001-10-23 14:42:22] [EMAIL PROTECTED]

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.



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

[2001-10-23 13:54:34] [EMAIL PROTECTED]

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.



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

[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

Reply via email to