Back to blog

Week in review: 06 Apr 2026

A short recap of what shipped during the week of 6 April. Six things landed, ranging from a public milestone for the website to deeper runtime work on reference counting and reflection.

pext.dev went live

The presentation website launched publicly this week. pext.dev covers language features, standard library coverage, an open source showcase, a full FAQ, and a demo booking page. It is the first time the project has had a public surface, and the feedback so far has been valuable for shaping what we publish next. See the launch announcement for the full details.

Reference counting: destructors on scope exit

A significant chunk of the week went into reference counting. The runtime now correctly handles variables going out of scope: when a refcount reaches zero, the associated object has its __destruct method invoked, in line with PHP semantics.

This closes a long-standing gap. Before this change, objects that should have been cleaned up on scope exit were being held alive by stray references, which meant side effects inside __destruct (resource release, logging, transactional rollback) would not fire when the converted code ran. The fix touches the runtime's lifecycle machinery and pays off across every codebase we transpile. You can track the broader class-related coverage on the Classes section of the features page.

sebastian/exporter: 82% test pass rate

Work on sebastian/exporter continued, with the pass rate climbing to 82%. The exporter is a core dependency of PHPUnit, and each percentage point on its test suite feeds directly into the PHPUnit effort. Most of the remaining failures are concentrated around recursion detection and a handful of edge cases in how complex types get rendered for output. The project is listed in our open source showcase.

Reflection: start line and end line

We spent some time researching how to support getStartLine and getEndLine on reflection objects. PHP exposes these for classes, methods, and functions, and several frameworks depend on them for error reporting and code analysis. The investigation looked at where this information needs to be captured at transpile time, how to carry it through to the runtime without inflating generated code, and how to surface it through the existing reflection APIs. This work is driven directly by the PHPUnit conversion effort, which leans heavily on reflection at runtime.

Comment-based attributes via preprocessing

Pext already supports native PHP 8 attributes (#[Attribute]). The last item on this week's list was finding a way to preprocess older comment-based attributes (the @annotation style used heavily by pre-8.0 codebases and still prevalent in PHPUnit, Doctrine, and Symfony) into the native attribute form before transpilation. The idea is to reuse the existing attribute machinery instead of building a second annotation reader. Early experiments look promising, and we expect this to unlock a meaningful chunk of the PHPUnit suite that currently relies on docblock annotations. This fits with the automated pre-processing approach described in the Pre-Transpiling FAQ.

Reddit post on the PHPUnit transpilation

To close the week, we shared the PHPUnit conversion story on r/javascript. The post walks through what it took to transpile 54k lines of PHP across 412 files into running JavaScript, and opens up a direct channel for questions from developers outside the PHP ecosystem.

The discussion there has been a useful reality check: the kinds of questions JavaScript developers ask about a PHP-to-JS transpiler are different from the ones we get from PHP teams, and that feedback is already shaping how we explain the project on the website. If you are reading this from that thread, welcome — the full PHPUnit write-up goes into more depth than the post could.