Bug #76538 [Opn->Csd]: token_get_all with TOKEN_PARSE flag fails to recognise close tag with newline
| From: | nikic@php.net | Date: | Wed, 27 Jun 2018 21:06:43 +0000 |
| Subject: | Bug #76538 [Opn->Csd]: token_get_all with TOKEN_PARSE flag fails to recognise close tag with newline | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215996@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76538&edit=1
ID: 76538
Updated by: nikic@php.net
Reported by: nathanielzimmermann at gmail dot com
Summary: token_get_all with TOKEN_PARSE flag fails to
recognise close tag with newline
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: MacOS
PHP Version: 7.3.0alpha2
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9b02ee0bba86becc951b65bb6d3527cf3ba7265e
Log: Fixed bug #76538
Previous Comments:
------------------------------------------------------------------------
[2018-06-27 20:49:36] nathanielzimmermann at gmail dot com
Description:
------------
token_get_all with the TOKEN_PARSE flag fails to recognise the T_CLOSE_TAG token if the close tag
has a newline afterwards
Test script:
---------------
var_dump(token_get_all("<?php echo 1 ?>\n", TOKEN_PARSE)[5]);
Expected result:
----------------
array(3) {
[0]=>
int(381)
[1]=>
string(3) "?>
"
[2]=>
int(1)
}
Actual result:
--------------
string(3) "?>
"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76538&edit=1