php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78602 declare on same line as opening tag causes a one line offset
Submitted: 2019-09-27 13:02 UTC Modified: 2020-01-20 17:13 UTC
From: jasny@php.net Assigned:
Status: Open Package: *General Issues
PHP Version: 7.2.23 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jasny@php.net
New email:
PHP Version: OS:

 

 [2019-09-27 13:02 UTC] jasny@php.net
Description:
------------
Code coverage by PHPUnit, stopping on breakpoints, etc all have an offset of 1 line when putting `declare(strict_types=1);` on the same line as the opening tag.

Test script:
---------------
<?php declare(strict_types=1);

hello();



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-27 15:25 UTC] cmb@php.net
I suggest to report Xdebug related issues on <https://bugs.xdebug.org/my_view_page.php>.
 [2020-01-20 17:13 UTC] derick@php.net
-Package: Xdebug +Package: *General Issues
 [2020-01-20 17:13 UTC] derick@php.net
I can't reproduce this with this little information. But if line numbers are wrong, that's not something Xdebug can fix as it is information provided by the PHP engine
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Mar 29 01:01:27 2020 UTC