php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33824 __destruct() mechanism propably incorrect
Submitted: 2005-07-22 18:15 UTC Modified: 2005-07-22 18:27 UTC
From: rusaxakep at mail dot ru Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.0.4 OS: Linux
Private report: No CVE-ID: None
 [2005-07-22 18:15 UTC] rusaxakep at mail dot ru
Description:
------------
I don't know, maybe is not bug, but in my opinion __destruct() must call in "FIFO" standart's and not "Stack".

I think not correct kill parent's classes, and after child classes.

Need a "tree effect", first kill child's classes (subtree), and after kill parent's classes.

Right? Sorry for bad english, is not native for me.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-22 18:19 UTC] rusaxakep at mail dot ru
Please ignore previous comment.

I don't know, maybe is not bug, but in my opinion __destruct() must call in "FIFO" standart's and not "STACK".

I think isn't correct kill parent's classes, before child classes.

Right?
 [2005-07-22 18:27 UTC] tony2001@php.net
There is no exact order of destroying object.
It's implemented in this way because of several reasons and one of the main ones is efficiency.
See more detailed explanations in several reports that were created before - search the bug DB.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Mar 13 21:01:32 2025 UTC