Symfony VarDumper
A better dump() function for PHP that walks and renders any variable clearly.
Repository Health
Technical Analysis
The Symfony VarDumper component provides a superior alternative to PHP’s built-in var_dump(). Its dump() and dd() (dump-and-die) functions render any arbitrary PHP variable — arrays, objects, closures, resources, and deeply nested structures — into clean, readable output with syntax highlighting, collapsible nodes in HTML, and clear type and reference information.
Under the hood it separates the concerns of cloning a variable’s structure from rendering it, which makes the output safe (it never triggers lazy loading or infinite recursion) and highly customizable. It powers the dump helpers used across the Symfony ecosystem and is widely adopted as a standalone debugging aid in any PHP project.
What You Get
- Global dump() and dd() helper functions for inspecting any PHP value
- Rich HTML output with collapsible nodes, search, and syntax highlighting
- Readable, colorized CLI output for terminal-based debugging
- Accurate display of object visibility, types, and shared references
- Casters that customize how specific classes and resources are represented
- A server dumper that can collect dumps out-of-band from HTTP responses
Common Use Cases
- Inspecting complex arrays and objects during development
- Replacing var_dump() and print_r() with cleaner, safer output
- Debugging request state in web applications without breaking the response
- Rendering structured dumps in logs or a dedicated dump server
Under The Hood
Architecture - VarDumper cleanly separates cloning from dumping. A Cloner (VarCloner) walks an arbitrary variable into a serializable Data tree of Stub objects, applying Casters that describe how each class or resource should be represented; a Dumper (CliDumper or HtmlDumper) then renders that tree to a chosen output. Because the clone is a snapshot, rendering never triggers lazy loading, side effects, or infinite recursion on circular references.
Tech Stack - Pure PHP (over 99% of the codebase) with small bundled CSS/JS assets for interactive HTML output. It uses PSR-4 autoloading under Symfony\Component\VarDumper, targets modern PHP, and ships an optional dump-server component built on Symfony’s process and networking primitives.
Code Quality - As a mature Symfony component it carries a large PHPUnit suite, strict CI-enforced coding standards, and heavy real-world use across the ecosystem. With 2,200+ commits and 150+ contributors led by core maintainers, the code is well factored around the cloner/caster/dumper abstraction.
API Design - The everyday API is a single global function: call dump($var) anywhere, or dd($var) to dump and stop execution. Advanced customization (registering casters, choosing dumpers, configuring the server) is available but entirely optional, so the barrier to first use is essentially zero.
Used by 8 apps in this directory
Craft CMS
CMS
A developer-first PHP CMS with clean-slate content modeling, auto-generated GraphQL API, and a four-tier edition system that scales from solo projects to enterprise deployments.
FreeScout
Customer Support
Run your own help desk and shared inbox — a fully self-hosted, open-source alternative to Zendesk and Help Scout with no per-agent fees.
Kimai
Invoicing Finance · Project Management
Professional open-source time tracking with invoicing, multi-user support, SAML/LDAP auth, and a full REST API—self-host it or use the cloud.
Leantime
Productivity · Project Management · Collaboration
Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira
matomo
Analytics
Open-source, privacy-first web and app analytics that puts you in complete control of your data.
Mautic
Automation · Marketing · Ecommerce
The world's largest open source marketing automation platform — own your data, run multi-channel campaigns, and escape vendor lock-in forever.
Shlink
Developer Tools · Marketing
Self-hosted PHP URL shortener with a full REST API, dynamic redirect rules, and real-time visit analytics under your own domain.
wallabag
Bookmarks Archiving
Self-hosted read-it-later app that saves clean, ad-free articles from any webpage for distraction-free reading across all your devices.