|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
38 - 37 = ?
Subscribe to this entry?

 [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: Thu May 13 03:01:24 2021 UTC