|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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: Thu May 13 04:01:23 2021 UTC