wishthis/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
2023-09-20 16:56:46 +02:00

20 lines
396 B
PHP

<?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);
}
}