This commit is contained in:
wangjinlei
2022-12-07 10:37:51 +08:00
parent 1271058def
commit c7cdf8a31f
668 changed files with 116142 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace DeepCopy;
use function function_exists;
if (false === function_exists('DeepCopy\deep_copy')) {
/**
* Deep copies the given value.
*
* @param mixed $value
* @param bool $useCloneMethod
*
* @return mixed
*/
function deep_copy($value, $useCloneMethod = false)
{
return (new DeepCopy($useCloneMethod))->copy($value);
}
}