ID: 9561
Updated by: stas
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

unset is an operator, not a function. @ is for functions.

Previous Comments:
---------------------------------------------------------------------------

[2001-03-05 09:58:26] [EMAIL PROTECTED]

The following code causes an error message:

Parse error: parse error in /home/cri/public_html/unsettest.php on line 14

<?php

error_reporting(15);

class someClass {

    var $someVar = array();

    function add($name, $val) {
        $this->someVar[$name] = $val;
    }

    function del($name) {
        return @unset($this->someVar[$name]);
    }

}


$someObj = new someClass;

$someObj->add("bike", "blue");

$someObj->del("bike");

?>

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9561&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to