You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
396 B
20 lines
396 B
<?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); |
|
} |
|
}
|
|
|