Symfony VarDumper

A better dump() function for PHP that walks and renders any variable clearly.

Library
Composer
vv8.1.9
7,424 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
89 /100 Excellent
Development Activity 100
Maintenance 96
Community 60
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 90
Code Quality 89
Innovation 78
Learning Curve 88

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 9 apps in this directory

PHP
78%
Other

Craft CMS

CMS

3,620

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.

View details
96
Repo Health
83
Technical
62
Dependency
Built with
PHP 78%
JavaScript 14%
Updated today
PHP
91%
AGPL 3.0

FreeScout

Customer Support

4,611

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.

View details
92
Repo Health
55
Technical
63
Dependency
Built with
PHP 91%
Updated yesterday
PHP
87%
AGPL 3.0

Kimai

Invoicing Finance · Project Management

5,095

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.

View details
94
Repo Health
78
Technical
64
Dependency
Built with
PHP 87%
Updated today
PHP
55%
AGPL 3.0

Leantime

Collaboration · Productivity · Project Management

11,890

Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira

View details
90
Repo Health
68
Technical
62
Dependency
Built with
PHP 55%
CSS 18%
Blade 14%
Updated 3 days ago
TypeScript
44%
Other

Magic

AI Agents · Automation · Low Code Platforms

5,055

Magic is an enterprise-grade open-source AI agent platform combining a generalist AI agent, workflow engine, IM, and collaborative office system for running an AI-powered digital workforce.

View details
68
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 44%
PHP 32%
Updated 2 months ago
PHP
78%
GPL 3.0

matomo

Analytics

21,976

Open-source, privacy-first web and app analytics that puts you in complete control of your data.

View details
95
Repo Health
82
Technical
62
Dependency
Built with
PHP 78%
Updated yesterday
PHP
81%
Other

Mautic

Automation · Ecommerce · Marketing

10,830

The world's largest open source marketing automation platform — own your data, run multi-channel campaigns, and escape vendor lock-in forever.

View details
98
Repo Health
76
Technical
63
Dependency
Built with
PHP 81%
Updated yesterday
PHP
99%
MIT

Shlink

Developer Tools · Marketing

5,366

Self-hosted PHP URL shortener with a full REST API, dynamic redirect rules, and real-time visit analytics under your own domain.

View details
84
Repo Health
83
Technical
73
Dependency
Built with
PHP 99%
Updated 3 days ago
PHP
84%
MIT

wallabag

Bookmarks Archiving

13,023

Self-hosted read-it-later app that saves clean, ad-free articles from any webpage for distraction-free reading across all your devices.

View details
93
Repo Health
81
Technical
60
Dependency
Built with
PHP 84%
Twig 13%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers