1<?php
2
3namespace DeepCopy;
4
5use function function_exists;
6
7if (false === function_exists('DeepCopy\deep_copy')) {
8    /**
9     * Deep copies the given value.
10     *
11     * @param mixed $value
12     * @param bool  $useCloneMethod
13     *
14     * @return mixed
15     */
16    function deep_copy($value, $useCloneMethod = false)
17    {
18        return (new DeepCopy($useCloneMethod))->copy($value);
19    }
20}
21