Provides Deep Cloning (Copying) of objects and arrays
Open Issues: 0
- php: >=7.1
- phpunit/phpunit: ^7.1
This package is auto-updated.
Last update: 2023-05-13 10:34:05 UTC
Copyright (c) 2018, Andreas Prucha (Abexto - Helicon Software Development) firstname.lastname@example.org
DeepClone is a package providing deep cloning (copying) of object instances in PHP.
Contrary to PHP's own clone functionality it does not rely on the class implementing it's cloning in the magic function
To install this library, run the command below and you will get the latest version
composer require amylian/deepclone --dev
DeepClone can be configured to handle special cases (e.g. instances of classes to be excluded from cloning in the instance tree), but in most cases this is not necessary. The straight forward use of DeepClone is:
$clonedObject = \Amylian\DeepClone\DeepClone::copy($originalObject);