Bug #73139 [NEW]: php throws error on OK function call

From: Date: Wed, 21 Sep 2016 21:19:23 +0000
Subject: Bug #73139 [NEW]: php throws error on OK function call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204169@lists.php.net to get a copy of this message
From: jim dot michaels at Jesusnjim dot com Operating system: vista 32 amd PHP version: 7.1.0RC2 Package: Unknown/Other Function Bug Type: Bug Bug description:php throws error on OK function call Description: ------------ parser throwing errors on a function call when it should not. this should not be happening. code is fine to my knowledge. Wed 09/21/2016 14:17:02.80|C:\w\Jesusnjim|>php --version PHP 7.1.0-dev (cli) (built: Sep 5 2016 07:44:38) ( NTS MSVC14 (Visual C++ 2015) x86 ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies Test script: --------------- <?php function ReplaceComment($haystack, $replacemiddlewith, $beginneedle, $endneedle, &$result, $tag){return true;} $result=""; $z=ReplaceComment("<!-- menustart --><!-- menuend -->", "filler", '<!-- menustart -->','<!-- menuend -->', $result,"visitor"); echo ($z?"false":"true").$result."\r\n"; $z=ReplaceComment("<!-- menustart -->t<!-- menuend -->", "filler2, '<!-- menustart -->','<!-- menuend -->', $result,"visitor"); echo ($z?"false":"true").$result."\r\n"; $z=ReplaceComment("<!-- menustart -->123456789012345678<!-- menuend -->", "filler3, '<!-- menustart -->','<!-- menuend -->',$result,"visitor"); echo ($z?"false":"true").$result."\r\n"; exit(1); ?> Expected result: ---------------- Wed 09/21/2016 14:13:10.19|C:\w\Jesusnjim|>php menu7a.php PHP Parse error: syntax error, unexpected 'visitor' (T_STRING), expecting ',' or ')' in C:\w\Jesusnjim\menu7a.php on line 196 Parse error: syntax error, unexpected 'visitor' (T_STRING), expecting ',' or ')' in C:\w\Jesusnjim\menu7a.php on line 196 Wed 09/21/2016 14:13:59.24|C:\w\Jesusnjim|> Actual result: -------------- Wed 09/21/2016 14:13:10.19|C:\w\Jesusnjim|>php menu7a.php PHP Parse error: syntax error, unexpected 'visitor' (T_STRING), expecting ',' or ')' in C:\w\Jesusnjim\menu7a.php on line 196 Parse error: syntax error, unexpected 'visitor' (T_STRING), expecting ',' or ')' in C:\w\Jesusnjim\menu7a.php on line 196 Wed 09/21/2016 14:13:59.24|C:\w\Jesusnjim|> -- Edit bug report at https://bugs.php.net/bug.php?id=73139&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73139&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73139&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73139&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73139&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73139&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73139&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73139&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73139&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73139&r=support Expected behavior: https://bugs.php.net/fix.php?id=73139&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73139&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73139&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73139&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73139&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73139&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73139&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73139&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73139&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73139&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73139&r=mysqlcfg

« previous php.bugs (#204169) next »