TL;DR: I built xph , an open-source compiler that lets you write Astro-like components with typed props, scoped CSS, and PHP server-side logic, then compiles them into native PHP, CSS, and JavaScript.
Build with Node.js. Run with PHP. No Node.js runtime required in production.
Why I built xph
I've been working with PHP for a long time, and I still appreciate its simplicity, especially when it comes to server-side rendering.
But when building modern user interfaces, I kept running into things that felt unnecessarily difficult.
I wanted to keep PHP as my server-side runtime while enjoying the developer experience that modern frontend frameworks provide.
There were five main reasons I started working on xph.
1. Server-side rendering with modern tooling
PHP already does server-side rendering really well.…