---
title: "[RFC] Pure-code source files via the .phpc extension"
url: https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-ddu04vnab
source_url: https://externals.io/message/131263
type: article
source: "externals.io"
published: 2026-06-15T08:27:02.807Z
updated: 2026-06-15T08:27:24.983Z
tags: ["php", "language-design"]
reading_time: 6
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)** · 6 min read · 0 upvotes · 0 comments

## Summary

A formal PHP RFC proposes a new `.phpc` file extension for pure-code PHP source files that don't require an opening `<?php` tag. The lexer would enter ST_IN_SCRIPTING on the first byte, with UTF-8 BOM and CLI shebang silently skipped. The change is strictly additive — existing `.php` files are unaffected. The reference implementation is ~50 lines of C in the Zend lexer scanner, 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, security implications for misconfigured webservers, and Phar/OPcache surface coverage. The RFC is in a two-week discussion period on the PHP internals mailing list.

## Full article

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

## 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-0fyqhkhac) · 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-1b9cxazb5) · 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-mvikxszyp) · 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-ddu04vnab)
