# [Pre-RFC] Pure-code source files via .phpc extension

- Thread: https://externals.io/message/131134
- Original archive: https://news-web.php.net/php.internals/131134
- Started by Michael Morris on 2026-06-04T13:47:31+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #131134 — Michael Morris — 2026-06-04T13:47:31+00:00

URL: https://externals.io/message/131134#131134

> 
>
> > […]
> with
> > […]
> provide
> > […]
> the
> > […]
> cost,
> > […]
> and
> > […]
>
> I think this adds a lot of complexity, for dubious benefit: not having
> to start PHP code files with "<?php".
>
> cheers,
> Derick


Question - what is the performance hit of scanning the file for <?php and,
if none are found, restarting the parse process in code mode?

If the hit isn't significant, this might be a way forward. There is the BC
break that files fed through the parser with nothing to parse will start
creating errors, but that situation (a php file with no <?php at all) feels
like an error state anyway. Thoughts?
