ID: 45762
Updated by: [email protected]
Reported By: marcus dot mueller at grintsch dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Linux gdev 2.6.25-2-amd64 #1 SMP
PHP Version: 5.2.6
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
You have a parse error in your second block of code.
eval('$foo='.$foo.' 1;var_dump($foo);');
Essentially you have
$foo = 9994!!!!! 1; var_dump($foo);
Previous Comments:
------------------------------------------------------------------------
[2008-08-08 12:59:02] marcus dot mueller at grintsch dot com
Description:
------------
I'm not quite sure this is a bug, so if it isn't please excuse my
ignorance.
Running the script below on a produces a "PHP Parse error: memory
exhausted".
Lowering 9994 to 9993 doesn't expose this behaviour and produces the
expected result (well, "boolean false" oc).
From the PHP manual: "PHP imposes no boundary on the size of a string;
the only limit is the available memory of the computer on which PHP is
running".
The box I'm running this on has 4GB.
Reproduce code:
---------------
<?php
for($foo='',$i=0;$i<9994;$i++) {
$foo.='1+';
}
eval('$foo='.$foo.' 1;var_dump($foo);');
for($foo='',$i=0;$i<9994;$i++) {
$foo.='!';
}
eval('$foo='.$foo.' 1;var_dump($foo);');
?>
Expected result:
----------------
int 9995
boolean true
Actual result:
--------------
int(9995)
Parse error: memory exhausted in not.php(10) : eval()'d code on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45762&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.