---
format: "aidr-story-markdown/v1"
id: "81dbc617dc435b2fa3cec71de9575229dd98ce2b07e3b8b0df330ed5cea82154"
canonical_url: "https://aidr.today/81dbc617?lang=en"
title: "When Modernization Breaks Working Code: A Study of LLMs on Legacy PHP"
lang: "en"
requested_lang: "en"
available_langs: ["en","vi"]
translation_fallback: null
fallback_fields: []
published_at: "2026-11-01T21:22:28.000Z"
category: "Research"
topics: ["llm"]
source_urls: ["https://arxiv.org/abs/2610.40269","https://news.ycombinator.com/item?id=50330033"]
summary: "Five LLMs were asked to modernize 100 WordPress 4.0 PHP files to PHP 8.3 while preserving behavior. Untouched, 83 files already passed every check, while the best LLM left only 59 passing. Each model broke 32-51 working files, whereas Rector broke 7 and repaired 6."
---

# When Modernization Breaks Working Code: A Study of LLMs on Legacy PHP

> [Open the canonical story](<https://aidr.today/81dbc617?lang=en>)

**Published:** 2026-11-01T21:22:28.000Z
**Category:** Research
**Topics:** llm

## Summary

Five LLMs were asked to modernize 100 WordPress 4\.0 PHP files to PHP 8\.3 while preserving behavior\. Untouched, 83 files already passed every check, while the best LLM left only 59 passing\. Each model broke 32\-51 working files, whereas Rector broke 7 and repaired 6\.

## Sources

- [Story source](<https://arxiv.org/abs/2610.40269>)
- [Discussion](<https://news.ycombinator.com/item?id=50330033>)

