My own example of all I know:
class Foo {
public $foo;
private $debug;
private function doSomething($args) {
return $args;
}
public function __construct($args) {
$this->debug[] = "Constructor called";
$this->foo = $this->doSomething($args);
}
public function __destruct($args) {
$this->debug[] = "Deconstructor called";
unset($this->foo);
}
}


Sign In
Create Account


Back to top









