Hi,
try:
_______
class A
{
protected $a;
public function __construct()
{
if(!isset($this->a))
{
$this->a = 'd';
echo '1st';
}
unset($this->a);
if(!isset($this->a))
{
$this->a = 'g';
echo '2nd';
}
}
public function __set($columnName, $value)
{
echo 'New value : ' . $value . ' for '. $columnName;
}
}
new A();
______
unset mean removing the instance variable from the class!!
I was using the lazy initialisation with the isset function but then
now I will initalize all inst var with null and check with the is_null
function.
Would it be possible to have inst var null by default insthead of a
pseudo unset/null variable.
Thanks
Cheers
- Mathieu Suen
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php