<?php class X { public $a; public ?int $b = 1; function clean() { unset($this->a); unset($this->b); } } $x = new X; $x->clean(); var_dump($x->a); var_dump($x->b); ?>
You have javascript disabled. You will not be able to edit any code.