php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71724 yield from does not count EOLs
Submitted: 2016-03-06 20:17 UTC Modified: -
From: temp at temp dot ru Assigned:
Status: Closed Package: *Compile Issues
PHP Version: 7.0.4 OS: Any
Private report: No CVE-ID:
 [2016-03-06 20:17 UTC] temp at temp dot ru
Description:
------------
PHP lexer does not count new lines which can be inserted between "yield" and "from" words in "yield from" instruction.

Test script:
---------------
<?php

function test()
{
    yield
    
    
    
    
    from [3, 4];
}

123


Expected result:
----------------
Parse error: syntax error, unexpected end of file in /in/7Hocc on line 13

Actual result:
--------------
Parse error: syntax error, unexpected end of file in /in/7Hocc on line 8

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-06 20:40 UTC] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=860dc17ab758683a121d66a625308bdfbbcad5c4
Log: Fixed bug #71724
 [2016-03-06 20:40 UTC] nikic@php.net
-Status: Open +Status: Closed
 [2016-07-20 11:33 UTC] davey@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=860dc17ab758683a121d66a625308bdfbbcad5c4
Log: Fixed bug #71724
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sat Apr 29 07:01:45 2017 UTC