PHPackages                             amylian/deepclone - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. amylian/deepclone

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

amylian/deepclone
=================

Provides Deep Cloning (Copying) of objects and arrays

v0.1.0(7y ago)112BSD-3-ClausePHPPHP &gt;=7.1

Since May 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/amylian/amylian-deepclone)[ Packagist](https://packagist.org/packages/amylian/deepclone)[ RSS](/packages/amylian-deepclone/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Amylian DeepClone
=================

[](#amylian-deepclone)

Copyright (c) 2018, [Andreas Prucha (Abexto - Helicon Software Development)](http://www.abexto.com%5D)

Status
------

[](#status)

VersionTravis ResultV 0.1.0[![V 0.1.0 Status](https://camo.githubusercontent.com/d9bc8d69c37051dda5f282f48e0331ee03006f74440c55bf6005559ea51f2915/68747470733a2f2f6170692e7472617669732d63692e6f72672f616d796c69616e2f616d796c69616e2d64656570636c6f6e652e7376673f6272616e63683d76302e312e30)](https://camo.githubusercontent.com/d9bc8d69c37051dda5f282f48e0331ee03006f74440c55bf6005559ea51f2915/68747470733a2f2f6170692e7472617669732d63692e6f72672f616d796c69616e2f616d796c69616e2d64656570636c6f6e652e7376673f6272616e63683d76302e312e30)Master[![Master Status](https://camo.githubusercontent.com/cf347e93f1be3640ea69fafe53dd860fc90239cee652ceca2bb5e2d25b8cddf3/68747470733a2f2f7472617669732d63692e6f72672f616d796c69616e2f616d796c69616e2d64656570636c6f6e652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/cf347e93f1be3640ea69fafe53dd860fc90239cee652ceca2bb5e2d25b8cddf3/68747470733a2f2f7472617669732d63692e6f72672f616d796c69616e2f616d796c69616e2d64656570636c6f6e652e7376673f6272616e63683d6d6173746572)Function Summary
----------------

[](#function-summary)

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`__clone()`.

Installation
------------

[](#installation)

To install this library, run the command below and you will get the latest version

```
composer require amylian/deepclone --dev
```

Basic Usage
-----------

[](#basic-usage)

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);
```

Links
-----

[](#links)

[Amylian/DeepClone Wiki on GitHub](https://github.com/amylian/amylian-deepclone/wiki)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2559d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aac759700a1ebf5ceb3bdda6b58776648360d5215fbd53169c70ea6b5b89ada?d=identicon)[ancpru](/maintainers/ancpru)

---

Top Contributors

[![ancpru](https://avatars.githubusercontent.com/u/7736882?v=4)](https://github.com/ancpru "ancpru (17 commits)")

---

Tags

cloneobjectscloningdeepclonedeepcopydeep copydeep clone

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/amylian-deepclone/health.svg)

```
[![Health](https://phpackages.com/badges/amylian-deepclone/health.svg)](https://phpackages.com/packages/amylian-deepclone)
```

###  Alternatives

[myclabs/deep-copy

Create deep copies (clones) of your objects

8.9k849.8M169](/packages/myclabs-deep-copy)[symfony/var-exporter

Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects

2.1k378.1M441](/packages/symfony-var-exporter)[ilya/belt

A handful of tools for PHP developers.

71020.8k1](/packages/ilya-belt)[minwork/array

Pack of advanced array functions specifically tailored for: associative (assoc) array, multidimensional array, array of objects and handling nested array elements

66256.1k5](/packages/minwork-array)[verbb/cloner

Easily clone sections, entry types, groups and more.

25178.7k](/packages/verbb-cloner)[acquia/mc-cs-plugin-custom-objects

This plugin adds custom objects feature.

4713.7k](/packages/acquia-mc-cs-plugin-custom-objects)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
