Возможно ли передавать параметры в деструктор и какие существуют при этом нюансы?
class People
{
public $name;
public $age;
public $sex;
public function __construct($name, $age, $sex)
{
$this->name = $name;
$this->age = $age;
$this->sex = $sex;
echo "It`s called function __construct <br>";
}
public function __destruct($name, $age, $sex)
{
echo $this->name . "is destroyed";
}
}
$people = new People("Ivan", 20, "male");