<?php class myClass { private $var = null; function __construct() { $this->var = "Hello"; } public function func() { $this->var = null; var_dump($this->var);// Does nothing, still "Hello" unset($this->var); var_dump($this->var);// Does nothing, still "Hello" $this->var = false; var_dump($this->var);// Works and prints "Hello" } } $c = new myClass; $c->func();
You have javascript disabled. You will not be able to edit any code.