PHP function to reset instance variables

Posted by & filed under Programming.

Quick snippet to reset all public instance variables inside a PHP class back to their original values. Can’t take credit for the code though. Found it on a website somewhere and have used it in pretty much every class I build. Problem is I can’t remember where it was originally.