php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60097 token_get_all fails to lex nested heredoc
Submitted: 2011-10-19 17:06 UTC Modified: 2012-08-20 04:47 UTC
From: nikic@php.net Assigned: stas (profile)
Status: Closed Package: *General Issues
PHP Version: 5.4.0beta1 OS:
Private report: No CVE-ID: None
 [2011-10-19 17:06 UTC] nikic@php.net
Description:
------------
token_get_all('<?php
<<<DOC
{$s(<<<ppp
ppp
)}
DOC;
');

Doesn't recognize DOC; as the heredoc end.
Looks like some of the heredoc LEXING code was put in the PARSER.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-19 22:48 UTC] felipe@php.net
It also causes a memory leak.

[Wed Oct 19 20:41:43 2011]  Script:  '../bug.php'
Zend/zend_language_scanner.l(2113) :  Freeing 0xB73DFBA4 (4 bytes), script=../bug.php
=== Total 1 memory leaks detected ===
 [2012-08-20 04:47 UTC] stas@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

fixed by 4cf90e06c9834a52195384da760503ea055c726d in master.
 [2012-08-20 04:47 UTC] stas@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: stas
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC