Download the PHP
package symfony/var-exporter without Composer
On this page you can find all versions of the php package
symfony/var-exporter. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor symfony Package var-exporter Short Description Allows exporting any serializable PHP data structure to plain PHP code License
MIT Homepage https://symfony.com
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
The VarExporter component provides various tools to deal with the internal state
of objects:
VarExporter::export() allows exporting any serializable PHP data structure to
plain PHP code. While doing so, it preserves all the semantics associated with
the serialization mechanism of PHP (__wakeup, __sleep, Serializable,
__serialize, __unserialize);
Instantiator::instantiate() creates an object and sets its properties without
calling its constructor nor any other methods;
Hydrator::hydrate() can set the properties of an existing object;
Lazy*Trait can make a class behave as a lazy-loading ghost or virtual proxy.
VarExporter::export()
The reason to use VarExporter::export()vsserialize() or
igbinary is performance: thanks to
OPcache, the resulting code is significantly faster and more memory efficient
than using unserialize() or igbinary_unserialize().
Unlike var_export(), this works on any serializable PHP value.
It also provides a few improvements over var_export()/serialize():
the output is PSR-2 compatible;
the output can be re-indented without messing up with \r or \n in the data;
missing classes throw a ClassNotFoundException instead of being unserialized
to PHP_Incomplete_Class objects;
references involving SplObjectStorage, ArrayObject or ArrayIterator
instances are preserved;
Reflection*, IteratorIterator and RecursiveIteratorIterator classes
throw an exception when being serialized (their unserialized version is broken
anyway, see https://bugs.php.net/76737).
Instantiator and Hydrator
Instantiator::instantiate($class) creates an object of the given class without
calling its constructor nor any other methods.
Hydrator::hydrate() sets the properties of an existing object, including
private and protected ones. For example:
Lazy Proxies
Since version 8.4, PHP provides support for lazy objects via the reflection API.
This native API works with concrete classes. It doesn't with abstracts nor with
internal ones.
This components provides helpers to generate lazy objects using the decorator
pattern, which works with abstract or internal classes and with interfaces:
In addition, this component provides traits and methods to aid in implementing
the ghost and proxy strategies in previous versions of PHP. Those are deprecated
when using PHP 8.4.
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package symfony/var-exporter contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.