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: 2018-11-23 09:21 UTC
From: dragondreamer at live dot com Assigned:
Status: Closed Package: *Compile Issues
PHP Version: 7.0.4 OS: Any
Private report: No CVE-ID: None
 [2016-03-06 20:17 UTC] dragondreamer at live dot com
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

Pull Requests

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
 [2018-11-23 09:21 UTC] dragondreamer at live dot com
-: temp at temp dot ru +: dragondreamer at live dot com
 [2018-11-23 09:21 UTC] dragondreamer at live dot com
Edit e-mail address
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 14:01:27 2024 UTC