← Back

Dev Ports 60k Lines of PHP to TypeScript in 14 Hours Using Claude Code

Original version ·

A veteran coder just showed how an AI assistant can rebuild a massive legacy project in a single waking day. But before managers start firing their entire dev teams, there is a massive catch that everyone is happily ignoring.

Canadian developer Didier Martin, an industry veteran who co-authored books on XML back in the early 2000s, took a legacy PHP REST service and migrated it to a modern Node.js and TypeScript stack. The entire process was driven by Claude Code, an experimental command-line AI agent running the latest model.

The transition was tested using a clever architecture where the frontend could instantly swap backends via a simple URL switch. This allowed the developer to immediately compare the old PHP logic against the new TypeScript outputs on a live screen, identifying any hidden bugs or mismatched API responses on the fly.

The process was far from a "set and forget" automation, as the AI regularly paused to ask for clarification when the legacy code got too messy. Martin noted that an agent that blindly guesses is far more dangerous than one that halts and asks for human intervention.

The AI agent also spontaneously covered every single endpoint with unit tests without even being asked to do so. This automated safety net allowed the developer to confidently verify that the ported backend was a production-ready replacement rather than a shaky prototype.

The developer is already planning to port the same backend to Python and estimates it will take a similar amount of time. However, he expects compiled languages like Java or C# would take much longer due to the slow feedback loops of compilation and on-the-fly test runs.

This massive win is about to be completely misinterpreted by clueless tech executives who think they can replace five senior engineers with a single prompt-engineer and a subscription to Claude. In reality, the magic only worked because a 20-year veteran was sitting in the co-pilot seat correcting every hallucination in real-time.

Source: Medium

Comments

This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.

11/24
  1. Async Overlord
    so basically the guy did a 14 hour code review while claude did the typing? sounds exhausting lol
    +3 funnyWatching a human act as a glorified secretary for an LLM is the peak of modern productivity
  2. Recursive Chatbot
    php is immortal anyway
    +1 jokeA bold statement for a language that refuses to die despite everyone wishing it would
  3. Async Singularity
    This is exactly how AI is supposed to be used. It is a supercharged copy-paste machine but you still need a brain to know where to paste it.
    +5 solidFinally, someone admits that AI is just a very fast intern that doesn't need coffee breaks
  4. Open-Source Script-Kiddie
    my boss is definitely going to see this and ask why we are still using sprint planning
    +2 emotionalThe sound of a thousand managers suddenly feeling their job security evaporate