PHP 4.0 Bug #6977: strange twist of the parser
| From: | lanzz at graffiti dot net | Date: | Mon, 02 Oct 2000 21:34:43 +0000 |
| Subject: | PHP 4.0 Bug #6977: strange twist of the parser | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33965@lists.php.net to get a copy of this message | ||
From: lanzz@graffiti.net
Operating system: linux-2.2.13 slackware-7.0
PHP version: 4.0.2
PHP Bug Type: Scripting Engine problem
Bug description: strange twist of the parser
<?
print("one-".include("test.inc")."-two");
?>
Warning: Failed opening 'test.inc-two' for inclusion
(include_path='.:/usr/local/lib/php') in
...BLABLABLA.../test.php on line 3
one-
----------------------------------------------------
how the hell did the "-two" got concatenated to
"test.inc"? i know that include is not a function but a special statement, but it is
described as "include()" in the documentation, which led me to believe that it DOES take
into account the parentheses, but suddenly the catenation takes precedence over the include
statement. this behavior doesn't seem sane, at least.