<?php /** * Replacer class testfile */ class classname { public static $varname = 0; function __construct() { $this->varname = 1; $this->funcname(); } function funcname() { self::$varname = 2; } function __destruct() { self::funcname(); } } $class = new classname; unset($class);?>