|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76538 token_get_all with TOKEN_PARSE flag fails to recognise close tag with newline
Submitted: 2018-06-27 20:49 UTC Modified: -
From: nathanielzimmermann at gmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.3.0alpha2 OS: MacOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nathanielzimmermann at gmail dot com
New email:
PHP Version: OS:


 [2018-06-27 20:49 UTC] nathanielzimmermann at gmail dot com
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) {
  string(3) "?>

Actual result:
string(3) "?>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-27 21:06 UTC]
Automatic comment on behalf of
Log: Fixed bug #76538
 [2018-06-27 21:06 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Apr 18 06:01:23 2021 UTC