Clone objects and its containing dependencies with DeepCopy

Code
<?php

use DeepCopy\DeepCopy;

class 
Foo
{
    public 
$bar;
    
    public function 
__construct(Bar $bar)
    {
        
$this->bar $bar;
    }
}

class 
Bar {}

// Create class for later cloning
$foo = new Foo(new Bar());

// Clone $foo and compare dependency instances
$clonedFoo = clone $foo;
dump($foo->bar === $clonedFoo->bar);

$deepCopy = new DeepCopy();
// DeepCopy $foo and compare dependency instances
// DeepCopy also clones Bar dependency
$fooCopy $deepCopy->copy($foo);
dump($foo->bar === $fooCopy->bar);
Result
true

false
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6