No need
Written on 2026-09-08I recently had an interesting conversation with Nuno on our podcast about TypePHP. In case you don't know: TypePHP is a new language based on PHP by the Swoole team, which compiles to native binaries. There's a bunch of interesting features that come with it, like static analysis and extended syntax.
For example, TypePHP has universal methods where you can chain function directly on native types:
$string = "hello world"; echo $string->length();
It has strong types like vectors that are checked during compile time:
$vector = std::vector(Type::Int);
It has high-precision types like BigInt, Decimal, and BigFloat; and of course, also the promise of delivering much better performance.
All of that sounds fun, but there's a serious limitation: being a compiled language, there are large parts of TypePHP that are incompatible with normal PHP. Yes, you can write a simple PHP script and compile it with TypePHP, but any real codebase, for example, frameworks like Tempest, Symfony, or Laravel won't be compatible. If you're curious, there's an extensive list of incompatible features to check out. That in itself isn't surprising, of course: PHP is a highly dynamic language, so it's natural that not all its dynamic runtime features can be ported to an ahead-of-time compiler. Especially features like dynamic function calls and closure scopes seem to be pretty important limiting factors.
And so that leads me to an important question: what exactly is TypePHP's target audience? I don't think it's realistic to assume people from outside PHP would be interested in it; this is mostly meant to appeal to programmers who are already experienced with PHP. But then, that main target audience is alienated because none of their production codebases and dependencies will work with TypePHP.
Maybe it's doable to rewrite everything to TypePHP with the help of AI these days, but who in their right mind would want to do that in real and critical projects? That's a huge risk for any company to take — I know I wouldn't.
That leads me to question the actual need for TypePHP. Yes, it's impressive as an experiment, but do we really need a language based on PHP which isn't compatible with its vast ecosystem? I'd say no, there's no need.
By the way, you can watch the whole episode on YouTube or search "Urgent PHP" in any podcast app: