annotate vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents
children
rev   line source
Chris@2 1 <?php
Chris@2 2
Chris@2 3 namespace DeepCopy;
Chris@2 4
Chris@2 5 /**
Chris@2 6 * Deep copies the given value.
Chris@2 7 *
Chris@2 8 * @param mixed $value
Chris@2 9 * @param bool $useCloneMethod
Chris@2 10 *
Chris@2 11 * @return mixed
Chris@2 12 */
Chris@2 13 function deep_copy($value, $useCloneMethod = false)
Chris@2 14 {
Chris@2 15 return (new DeepCopy($useCloneMethod))->copy($value);
Chris@2 16 }