PHP 4.0 Bug #9202 Updated: Parse error when using terniary (?:) and unset()
| From: | jmcastagnetto@php.net | Date: | Sat, 17 Mar 2001 06:35:12 +0000 |
| Subject: | PHP 4.0 Bug #9202 Updated: Parse error when using terniary (?:) and unset() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49203@lists.php.net to get a copy of this message | ||
ID: 9202
Updated by: jmcastagnetto
Reported By: mlr@mijoheto.com
Old-Status: Open
Status: Closed
Bug Type: Documentation problem
Assigned To:
Comments:
Documentation fixed
Previous Comments:
---------------------------------------------------------------------------
[2001-02-09 22:45:12] mlr@mijoheto.com
The documentation for Unset() states:
Description
int unset (mixed var [, mixed var [, ...]])
unset() destroys the specified variables and returns true.
I have changed the type of this bug report to "Documentation Problem", since I have been
informed that Unset is not a function.
<?
$avariable = "test";
$avariable=="test" ? $avariable .=" No problem with is_bool" :
is_bool($avariable);
$avariable=="test" ? $avariable .=" No problem with isset" :
isset($avariable);
$avariable=="test" ? $avariable .=" No problem with empty" :
empty($avariable);
$avariable=="test" ? $avariable .=" Problem with unset" :
unset($avariable);
echo $avariable;
?>
Output is
Parse error: parse error in /home/httpd/html/mlr/unsetProblem.php on line 6
---------------------------------------------------------------------------
[2001-02-09 20:29:34] mlr@mijoheto.com
<?
$avariable = "test";
$avariable=="test" ? $avariable .=" No problem with is_bool" :
is_bool($avariable);
$avariable=="test" ? $avariable .=" No problem with isset" : isset($avariable);
$avariable=="test" ? $avariable .=" No problem with empty" : empty($avariable);
$avariable=="test" ? $avariable .=" Problem with unset" : unset($avariable);
echo $avariable;
?>
Output is
Parse error: parse error in /home/httpd/html/mlr/unsetProblem.php on line 6
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9202&edit=2