A PHP internals RFC proposes a new `.phpc` file extension that allows PHP files to be parsed as pure PHP code without requiring the `<?php` opening tag. The lexer would enter scripting mode on the first byte, while UTF-8 BOMs and CLI shebangs are silently skipped. The change is strictly additive — existing `.php` files are unaffected. The implementation is ~50 lines of C in the Zend lexer with 15 new tests and zero regressions. Community feedback is mixed: some see it as unnecessary complexity since `<?php` is only 5 characters, while the author argues PHP is the only modern mainstream language requiring such a mandatory opener for pure-code files. Open issues include the final extension name (.phpc/.phpp/.pcode/.phpx), backward compatibility, and security concerns around misconfigured web servers exposing source files.

37m read timeFrom externals.io
Post cover image
76 Impressions