Bug #73139 [Opn->Nab]: php throws error on OK function call
| From: | requinix@php.net | Date: | Wed, 21 Sep 2016 23:04:11 +0000 |
| Subject: | Bug #73139 [Opn->Nab]: php throws error on OK function call | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204172@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73139&edit=1
ID: 73139
Updated by: requinix@php.net
Reported by: jim dot michaels at Jesusnjim dot com
Summary: php throws error on OK function call
-Status: Open
+Status: Not a bug
Type: Bug
Package: Unknown/Other Function
Operating System: vista 32 amd
PHP Version: 7.1.0RC2
Block user comment: N
Private report: N
New Comment:
"filler2,
"filler3,
Previous Comments:
------------------------------------------------------------------------
[2016-09-21 21:19:20] jim dot michaels at Jesusnjim dot com
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 this bug report at https://bugs.php.net/bug.php?id=73139&edit=1