php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #7899 Class selfdestruct
Submitted: 2000-11-21 04:41 UTC Modified: 2002-01-06 12:17 UTC
From: wico at cnh dot nl Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (21/11/2000) OS: any
Private report: No CVE-ID: None
 [2000-11-21 04:41 UTC] wico at cnh dot nl
Hiya 

I'd like to see a destructor for classes from within the class 

example:

$file = new file("somefile.ext);
// instert some long script here
$file->del_file();
at this point $file should be FALSE of NULL (set from within the class)

some ideas:
unset($this);
or $this->Destruct();

Greetz,

Wico

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-06 12:17 UTC] jan@php.net
we'll have destructors and more improved OO with ZE2 (PHP5). please propose anything to engine2@lists.zend.com. closing
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 10:01:28 2025 UTC