• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHP_CodeSniffer / 14349155572 / 2
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: fix/interface-indentation
DEFAULT BRANCH: master
Ran 09 Apr 2025 04:51AM UTC
Files 263
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Apr 2025 04:43AM UTC coverage: 2.643% (-0.003%) from 2.646%
14349155572.2

push

github

jrfnl
PHP 7.4 | Tokenizer/PHP: handle PHP tag at end of file consistently

Prior to PHP 7.4, a PHP open tag at the end of a file was not tokenized correctly in PHP itself.

From the PHP 7.4 changelog:
> `<?php` at the end of the file (without trailing newline) will now be
> interpreted as an opening PHP tag. Previously it was interpreted either as
> `<? php` and resulted in a syntax error (with short_open_tag=1) or was
> interpreted as a literal `<?php` string (with short_open_tag=0).

This commit makes the tokenization of PHP open tags at the end of a file consistent in all PHP versions.

Includes tests.
Includes adding a few extra test builds which test with `short_open_tag=On` for various PHP versions.

Refs:
* https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.php-tag
* https://github.com/php/php-src/blob/30de357fa/UPGRADING#L37-L40

654 of 24747 relevant lines covered (2.64%)

0.28 hits per line

Source Files on job os-windows-latest-php-8.4-custom-ini-false - 14349155572.2
  • Tree
  • List 263
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14349155572
  • c2886750 on github
  • Prev Job for on 4.0 (#14349056891.3)
  • Next Job for on 4.0 (#14349226593.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc