php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1312 eval() crashs after 4094 steps
Submitted: 1999-04-13 01:15 UTC Modified: 1999-05-11 07:51 UTC
From: zager at post dot comstar dot ru Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.7 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zager at post dot comstar dot ru
New email:
PHP Version: OS:

 

 [1999-04-13 01:15 UTC] zager at post dot comstar dot ru
<? set_time_limit(0);
   
   //first possible bug
   $s="Hello";
   $ss="$s world!";
   echo "1 $ss\n";  //echo as expected "Hello world!"
   $ss='$s world!'; //the only difference from previous                                         //assigment is quotation marks
   echo "2 $ss\n";  //a bit different output "$s world!"
   
   //second bug eval()
   $cmd="echo '$s world!\n';";
   
   for($i=0;1;$i++)
    { echo "$i:";
      eval($cmd);
    }  
?>

Script output
// first bug
1 Hello world!
2 $s world!

//second bug with eval()
4094:Hello world!
4095:<br>
<b>Fatal error</b>:  Unable to initialize a new token cache in <b>bug.php3</b> on line <b>16</b><br>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-11 07:51 UTC] sas at cvs dot php dot net
This is a known "feature" of the current PHP implementation. There is no way around it. PHP4 will do it better.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 13 04:00:01 2026 UTC