#20454 [Opn->Csd]: isset(eval("\$var".$n.";")) ===>> CRASH!!!
| From: | philip@php.net | Date: | Sat, 16 Nov 2002 07:58:07 +0000 |
| Subject: | #20454 [Opn->Csd]: isset(eval("\$var".$n.";")) ===>> CRASH!!! | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969349712@lists.php.net to get a copy of this message | ||
ID: 20454
Updated by: philip@php.net
Reported By: manogarc@hotmail.com
-Status: Open
+Status: Closed
-Bug Type: Variables related
+Bug Type: Documentation problem
Operating System: Windows NT 5
PHP Version: 4.2.3
New Comment:
This is now further documented with a <note>. Documentation changes to
this function can be seen here:
http://cvs.php.net/cvs.php/phpdoc/en/reference/var/functions/isset.xml
isset() only takes on variables, thanks for the report.
Previous Comments:
------------------------------------------------------------------------
[2002-11-15 20:44:10] manogarc@hotmail.com
In this example, i´m triying to recover an indeterminate number of vars
from a form with the code below. The type of vars is like this: $var1,
$var2, $var3, ... but the succesion can be incomplete like this $var1,
$var5, $var6, ...
for ($n=0; n<=10; $n++) {
if (isset(eval("\$var".$n.";")) {
[...]
}
}
and the error message is:
Parse error: parse error, unexpected T_EVAL, expecting T_VARIABLE or
'$' in d:\inetpub\wwwroot\administracion\val_empextdb.php on line 14
Thanks.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20454&edit=1