News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Keeping Track of Objects when Using Destructors in PHP 5
January 30, 2008 @ 11:19:00

Devshed continues their series looking at the use of destructors in PHP5 applications with part three, a method for keeping track of objects you've created during execution.

In this third part of the series, I'm going to show you how to retrieve some useful information about a specific object, including its properties and methods, prior to its being destroyed by the PHP parser via the implementation of a simple destructor.

Their new user class extracts the details about each of the objects right before they're destroyed via a call to get_object_vars and a loop to display the property and its value.

0 comments voice your opinion now!
php5 destructor object track property


blog comments powered by Disqus

Similar Posts

HowToForge.com: Running Apache2 With PHP5 And PHP4 At The Same Time

Ilia Alshanetsky's Blog: 5.2.4 RC1 Released

PHPClasses.org: The Secret PHP Optimization of version 5.4

Greg Beaver\'s Blog: subtle PHP 4 to PHP 5 difference regarding objects

DevShed: Working with Multiple Document Nodes with the DOM XML Extension in PHP 5


Community Events





Don't see your event here?
Let us know!


podcast developer code configure library bugfix laravel list install community introduction threedevsandamaybe series application wordpress interview release language unittest api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework