PHP Classes

File: vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php

Recommend this page to a friend!
  Classes of Cuthbert Martin Lwinga   PHP Neural Net Library   vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php   Download  
File: vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Neural Net Library
Build, train, evaluate, and use neural networks
Author: By
Last change:
Date: 11 months ago
Size: 396 bytes
 

Contents

Class file image Download
<?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);
    }
}