Skip to content

PHP: # line comments are not stripped, so commented code counts in every keyword family #9443

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: # starts a line comment in PHP (and #[ starts an attribute, PHP 8). Prism's standard_block family only strips // and /* */ for php.

Snippet (leaks for every family; shown with debug_prints and telemetry):

<?php
# echo "hi";
# Log::info("x");

Expected: 0 hits. Actual: 1 each. The trailing form $x = 1; # Log::info("x"); and $u = "http://x"; # ... leak too; branch and io leak the same way, so this is not specific to the two new cells.

Locked in tests/decoys/test_decoy_php.py::test_php_hash_line_comment_does_not_count (and the trailing and string-boundary variants).

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