DeepHorus is an innovative tech media and intelligence platform focused on AI, blockchain, startups, and emerging technologies.
Published on

My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

Authors
  • avatar
    Name
    DeepHorus
    Twitter

A new PHP engine written entirely in Rust by artificial intelligence has achieved a 17.4% pass rate on the official PHP test suite and successfully rendered a WordPress front page. Named Phargo, the engine was developed by a creator who admits to having no prior knowledge of Rust, lexers, or PHP internals, relying entirely on AI code generation to build the interpreter from scratch. The milestone demonstrates a novel approach to software development where the human role is limited to directing the AI and verifying results against an objective test suite.

The project’s creator, who remains anonymous, described the workflow as 'radically honest' because it sidesteps common AI demo pitfalls by using the PHP project's own 22,037 .phpt test files—written by the PHP internals team over three decades—as an unchangeable oracle. The pass rate is automatically generated after every run and cannot be manipulated. 'Either bug40261.phpt passes, or it doesn’t,' the creator stated. The current score of 3,844 passing tests (17.4%) represents a climb from zero, with a realistic ceiling of 40–45% because the remaining tests involve C extensions out of scope.

The development process involves a tight loop: the AI analyzes failure histograms, implements fixes, runs the full test suite (which takes about seven minutes), and the human either commits the improvement if the number goes up or asks the AI to 'look again' if it regresses. The creator described this as 'peak delegation,' acknowledging the minimal technical involvement. However, a critical lesson was learned when the pass rate plateaued due to a line-ending bug in the test harness—CRLF vs. LF comparisons caused hundreds of tests to fail invisibly. Fixing that single normalization issue turned hundreds of tests green instantly.

The implications for AI-assisted software development are significant. By binding the AI to an immutable, high-quality test suite, the project ensures measurable progress without subjective grading. This approach mirrors methodologies used by teams like Bun, which drive their runtime against real-world tests. The creator emphasizes that the oracle must be reliable: 'measure your measurement,' they noted, after the line-ending discrepancy was caught.

Reactions from the developer community have been mixed, with some praising the transparency of the test-scoreboard approach and others questioning the maintainability of AI-generated code. The creator remains unfazed, noting that the AI handles all implementation details while the human provides high-level direction. 'I fake a phone call if asked about garbage collectors,' they joked.

Looking ahead, Phargo aims to push the pass rate toward its ceiling by tackling core PHP language features and edge cases. The project’s success hinges on the AI’s ability to handle increasingly complex failures and the sustainability of the human-AI collaboration. If the trend continues, fully AI-built interpreters could become viable for production use, fundamentally altering how programming languages are implemented. For now, the Phargo experiment stands as a proof of concept that AI can build real software—as long as someone oversees the scoreboard.

Read original article →Source: hn-frontpage