<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-0fyqhkhac" -->

---
title: [RFC] Pure-code source files via the .phpc extension
description: A formal PHP RFC proposes a new .phpc file extension that allows PHP files to be parsed as pure code without requiring the opening &lt;?php tag. The lexer would...
canonical: https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-0fyqhkhac
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: [RFC] Pure-code source files via the .phpc extension | daily.dev
og:description: A formal PHP RFC proposes a new .phpc file extension that allows PHP files to be parsed as pure code without requiring the opening &lt;?php tag. The lexer would...
og:url: https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-0fyqhkhac
og:image: https://api.daily.dev/og/posts/0FYqHkhAc.png
og:image:alt: [RFC] Pure-code source files via the .phpc extension
og:image:width: 1200
og:image:height: 630
og:locale: 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)** · 45 min read · 0 upvotes · 0 comments

## Summary

A formal PHP RFC proposes a new .phpc file extension that allows PHP files to be parsed as pure code without requiring the opening <?php tag. The lexer would enter ST_IN_SCRIPTING on the first byte, with UTF-8 BOM and CLI shebangs 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 discussion is mixed: some see it as unnecessary complexity since <?php is only 5 characters, while the author argues most modern PHP files are pure code where the opener carries no semantic value. Open issues include the final extension name (.phpc/.phpp/.pcode/.phpx), backward compatibility, and security concerns around misconfigured web servers exposing source files.

## Full article

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

## 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-r64xmy6u5) · 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-swtt7sypx) · 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
- [\[RFC\] Pure-code source files via the .phpc extension](https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-2qac9kutf) · 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-jjlzpwyl5) · 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-0fyqhkhac)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"[RFC] Pure-code source files via the .phpc extension","url":"https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-0fyqhkhac","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-0fyqhkhac"},"datePublished":"2026-06-17T01:15:30.833Z","dateModified":"2026-06-17T01:54:32.422Z","description":"A formal PHP RFC proposes a new .phpc file extension that allows PHP files to be parsed as pure code without requiring the opening <?php tag. The lexer would...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"externals.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"externals.io","logo":"https://media.daily.dev/image/upload/s--9i0zxASK--/f_auto,q_auto/v1780213616/logos/externals?_a=BAMAMiWQ0","url":"https://daily.dev/sources/externals"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rfc-pure-code-source-files-via-the-phpc-extension-0fyqhkhac","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,language-design","timeRequired":"PT45M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"externals.io","item":"https://daily.dev/sources/externals"},{"@type":"ListItem","position":3,"name":"[RFC] Pure-code source files via the .phpc extension"}]}
```

