PHP 4.0 Bug #6937: Mid-string expressions not parsed properly

From: Date: Fri, 29 Sep 2000 10:38:17 +0000
Subject: PHP 4.0 Bug #6937: Mid-string expressions not parsed properly
Groups: php.dev 
Request: Send a blank email to php-dev+get-33840@lists.php.net to get a copy of this message
From: mattw@getacard.com Operating system: Red Hat Linux 6.2 PHP version: 4.0.2 PHP Bug Type: Scripting Engine problem Bug description: Mid-string expressions not parsed properly If $NumFixes = 2, then the following lines of code: echo("Num fixes: [" . $NumFixes - 1 . "]\n"); echo("Num fixes: [" . ($NumFixes - 1) . "]\n"); Produce this output: -1] Num fixes: [1] I assumed that the echo function, at least, worked the same way in PHP as it does in C. C doesn't have a concatenation operator though, and maybe this is as intended. (If it's not, then please fix it, because although the second line of code is "cleaner", the first line should work *anyway*.) - Matt Waggoner, mattw@getacard.com

« previous php.dev (#33840) next »