---
title: "[RFC] Pure-code source files via the .phpc extension"
url: https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-dusdumfmr
source_url: https://externals.io/message/131265
type: article
source: "externals.io"
published: 2026-06-15T08:57:55.484Z
updated: 2026-06-15T08:58:17.252Z
tags: ["php", "language-design"]
reading_time: 9
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

**[externals.io](https://daily.dev/sources/externals)** · 9 min read · 0 upvotes · 0 comments

## Summary

A formal RFC has been submitted to the PHP internals mailing list proposing a new `.phpc` file extension that allows PHP files to be parsed as pure PHP code without requiring an opening `<?php` tag. The lexer would enter scripting mode on the first byte, and UTF-8 BOMs and CLI shebangs would be silently skipped. The change is strictly additive — existing `.php` files are unaffected. The reference implementation is ~50 lines of C in the Zend lexer with 15 new tests and zero regressions across 9836 existing tests. Open issues include the final extension name (`.phpc`, `.phpp`, `.pcode`, or `.phpx`), backward compatibility concerns, and security implications for misconfigured web servers. Early community responses are skeptical, with respondents questioning the real-world benefit and arguing that simply adding `<?php` at the top of a file already solves the problem.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://externals.io/message/131265>

## Similar posts on daily.dev

- [\[RFC\] Pure-code source files via the .phpc extension](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-ks1n1v9qm) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Pure-code source files via the .phpc extension](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-1vuuvtj3a) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Pure-code source files via the .phpc extension](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-fwdueyqwy) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Pure-code source files via the .phpc extension](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-m0pr8ecwm) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Pure-code source files via the .phpc extension](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-f3g3bengk) · externals.io · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#language-design](https://daily.dev/tags/language-design)

[View this post on daily.dev](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-dusdumfmr)
