PHP 4.0 Bug #4929: eval() doesn't parse string - in 3.0.x versions it did

From: Date: Fri, 09 Jun 2000 13:19:52 +0000
Subject: PHP 4.0 Bug #4929: eval() doesn't parse string - in 3.0.x versions it did
Groups: php.dev 
Request: Send a blank email to php-dev+get-20727@lists.php.net to get a copy of this message
From: whole@gmx.net Operating system: Linux (Suse 6.2) PHP version: 4.0.0 Release PHP Bug Type: Misbehaving function Bug description: eval() doesn't parse string - in 3.0.x versions it did I used the following function with PHP 3.0.1x function aedat($d,$art) { $jj=substr($d,0,2); $mm=substr($d,2,2); $tt=substr($d,4,2); eval("return \$$art;"); } and it did work that way. With PHP 4.0 I had to make the following change: function aedat($d,$art) { $jj=substr($d,0,2); $mm=substr($d,2,2); $tt=substr($d,4,2); eval("\$val=\$$art;"); return $val; } How come? Is that a bug?

« previous php.dev (#20727) next »