You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
php: every file's <?php open tag counts branch +1 (ternary ? alternation matches the tag) #2541
Found by the #1096 control corpus: every PHP file records branch >= 1 from its own <?php open tag — the branch rule's bare ternary ? alternation matches the ? in the tag.
Evidence
finditer on data/php/a.php (a file with zero planted branch keywords) returns ['?']; the end-to-end scan records branch 1. All four corpus php files carry the constant +1 (main 4 = tag + if/else/switch; a/c = 1 = tag alone). Pattern tail: ...|&&|\|\||\?\?|\?.
Impact
A systematic per-file branch inflation on the entire PHP ecosystem — every file's cognitive-load/branch mass is shifted up by its open tag(s), including ?>/<?= variants.
Fix shape
Exclude tag context from the ? alternation (e.g. negative lookbehind for < and lookahead for php|=|>), or strip tags in prism before counting.
References
#1096 corpus ledger php-open-tag-counts-branch; data/php/expected_signals.json bakes the current behavior.
Activity
fix(core-engine): Rosetta corpus sweep — six extraction/DAG/recorder …