Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Destroying objects in PHP

Status
Not open for further replies.

vladibo

Programmer
Joined
Sep 14, 2003
Messages
161
Location
CA
Is there any sense in destroying PHP object after they complete their mission?

Can I do it just with

$myobj = NULL;
 
The only reason I can see for explicitly destoying a PHP object is to free up resources during a longer-running script. Otherwise, the end of script execution will handle the problem for you.

In those situations where I need to explicitly get rid of a variable, I use unset() (
Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top