Skip to content

PHP: a comment on the same line as the opening <?php tag (first line of the file) is counted as code #9445

Backlog

Description

@squid-protocol

Found by the SOP-002 gap-cell decoy suite (protocol SOP-002-v1, epic #8863). Locked in as xfail(strict=True); no engine change in that PR.

Construct: <?php // note is a very common first line. When <?php is on line 1 and a comment follows on that line, the comment text counts.

Snippets (each expected 0, actual 1):

<?php // Log::info("x");
<?php /* public function run() {} */

The same text on line 2 (<?php\n// Log::info("x");) or after a blank first line gives 0, so only the line-1 opener line is affected.

Locked in tests/decoys/test_decoy_php.py::test_php_comment_on_the_opening_tag_line.

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions