NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #639 most downloaded on Packagist
A powerful alternative to var_export(), which can export closures and objects without __set_state()
Last release 9 months ago
06 Jan 2026
Release timing varies
gaps range from 2 weeks to 1.4 years
Nearly every release is documented
notes for 18 of 18 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
18 releases · first in 2019
Added VarExporter::INLINE_LITERAL_LIST , similar to INLINE_SCALAR_LIST but includes enum values
✨ New features
VarExporter::INLINE_LITERAL_LIST, similar to INLINE_SCALAR_LIST but includes enum values💥 BC breaks
8.2One column per quarter.
deprecated constant VarExporter::INLINE_NUMERIC_SCALAR_ARRAY has been removed, please use INLINE_SCALAR_LIST instead
✨ Compatibility
nikic/php-parser 5.xnikic/php-parser 4.x💥 BC breaks
VarExporter::INLINE_NUMERIC_SCALAR_ARRAY has been removed, please use INLINE_SCALAR_LIST insteadMinimum PHP version is now 7.4 . No breaking changes.
Minimum PHP version is now 7.4. No breaking changes.
Support for PHP 8.1 readonly properties ( #27 , #28 )
The VarExporter::INLINE_NUMERIC_SCALAR_ARRAY is deprecated, please use INLINE_SCALAR_LIST instead
✨ New feature
VarExporter::INLINE_ARRAY🗑️ Deprecated
VarExporter::INLINE_NUMERIC_SCALAR_ARRAY is deprecated, please use INLINE_SCALAR_LIST insteadSupport for PHP 8.1 enums ( #23 ).
Support for controlling the base indentation level ( #17 ).
Support for trailing comma in non-inline arrays, with the TRAILING_COMMA_IN_ARRAY flag ( #16 ).
Exporting an object with numeric dynamic properties would lead to a TypeError
🐛 Bug fix
TypeErrorSupport for exporting internal classes implementing __set_state():
✨ New feature
Support for exporting internal classes implementing __set_state():
DateTimeDateTimeImmutableDateTimeZoneDateIntervalDatePeriodThanks @GameplayJDK!
Support for closures with use() using the CLOSURE_SNAPSHOT_USE option
✨ New features
use() using the CLOSURE_SNAPSHOT_USE option (#7)Thanks to @jasny for his awesome work!
Minimum PHP version is now 7.2. No breaking changes.
Minimum PHP version is now 7.2. No breaking changes.
✨ New option: VarExporter::INLINE_NUMERIC_SCALAR_ARRAY
✨ New option: VarExporter::INLINE_NUMERIC_SCALAR_ARRAY (#3)
Formats numeric arrays containing only scalar values on a single line.
Experimental support for closures 🎉
✨ New feature
💥 Minor BC break
export() does not throw an exception anymore when encountering a Closure.NO_CLOSURES option.Static properties in custom classes were wrongly included—unset()—in the output
🐛 Bug fixes
unset()—in the output✨ Improvements
ExportException instead of erroring.Single-letter properties were wrongly exported using ->{'x'} notation.
🐛 Bug fixes
->{'x'} notation.✨ Improvements
Exception messages now contain the path (array keys / object properties) to the failure:
[foo][bar][0]Type "resource" is not supported.
First release.
First release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →