If needed, parameters can be passed to a class via it's constructor.
class Test {
public function __construct($echo) {
echo $echo;
}
}
$test = new Test('hello'); // Echos "hello"
Is there any way of passing parameters to the __destruct?
class Test {
public function __construct($echo) {
echo $echo;
}
public function __destruct($string) { // Is this possible?
// Do something with this string
}
}