|  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-12-27 04:22 UTC
From: Assigned: cmb (profile)
Status: No Feedback Package: Scripting Engine problem
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.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2019-09-27 13:02 UTC]
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);



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-27 15:25 UTC]
I suggest to report Xdebug related issues on <>.
 [2020-01-20 17:13 UTC]
-Package: Xdebug +Package: *General Issues
 [2020-01-20 17:13 UTC]
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
 [2020-12-18 13:12 UTC]
-Status: Open +Status: Feedback -Package: *General Issues +Package: Scripting Engine problem -Assigned To: +Assigned To: cmb
 [2020-12-18 13:12 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

I cannot reproduce either: <>.
 [2020-12-27 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Nov 29 22:05:54 2022 UTC