Skip to content
cd /languages
Old web, new pressure Programming Full graph support

PHP Support in Maguyva: Long-Lived Web Apps Without Blind Edits

Maguyva supports PHP with AST parsing and symbol extraction so AI agents can navigate Laravel apps, custom frameworks, WordPress-era code, and other long-lived PHP repositories with more structure than grep.

PHP is one of the clearest examples of why broad language support needs to be real, not aspirational. Many important systems are still PHP systems: Laravel apps, old monoliths, internal admin tools, and heavily customized web applications that survived every planned rewrite.

In those repos, the problem is not syntax. It is safely recovering structure from a codebase that has had years to accrete helpers, framework conventions, and local shortcuts.

What Maguyva actually extracts in PHP

Maguyva strips the $ sigil from definitions, normalizes member-prefixed calls, and filters a very large amount of PHP builtin-function noise out of the relationship graph. That is exactly the kind of cleanup older PHP code needs before search and dependency views become useful.

It also supports the file shapes PHP teams actually encounter, from .php and .phtml to older versioned extensions that still show up in long-lived estates.

Useful MCP workflows for long-lived PHP apps

The productive pattern is usually:

  • find_symbol for controllers, services, models, or helper classes with stable names.
  • text_pattern_search for route names, helper calls, or old framework conventions when exact text is still the fastest path.
  • get_task_context when the code path is messy and you want a stitched summary before editing.

When this page is useful

This page is for teams whose practical question is simply “we still run important PHP.” If the frontend lives in modern JavaScript, read JavaScript next. If the repo has newer service or automation layers around the edges, Python is the more relevant companion page.

Best fit

  • > Laravel, custom PHP, or mixed monolith repositories that still matter operationally.
  • > Teams maintaining older web applications that now sit beside JavaScript frontends and infrastructure code.
  • > AI-assisted refactoring work where the priority is understanding existing flow before changing it.

Agent workflows

  • > Trace a route, controller, service, or shared helper path before editing it.
  • > Find repeated implementation patterns across a mature PHP codebase instead of inventing new ones.
  • > Recover structure in older code that has lived through several framework or hosting eras.

Engine details

  • > PHP strips the `$` sigil from definitions and normalizes member-prefixed calls, which makes old helper-heavy code easier to search consistently.
  • > Support covers common PHP file shapes including `.php`, `.php3`, `.php4`, `.php5`, `.phtml`, and `.phps`.
  • > A large builtin-function filter removes the standard PHP runtime surface so the graph stays focused on application code.

Useful MCP entry points

  • find_symbol

    Use it for a controller, service, model, or helper class when the repo still has recognizable symbol names.

  • text_pattern_search

    Use it for route names, helper calls, or old framework conventions when structure alone is not enough.

  • get_task_context

    Useful when you need a stitched summary of an old PHP flow before changing it.

MAGUYVA.NFO