Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function arrayCopy(array $array) {
- $result = array();
- foreach($array as $key => $val) {
- if(is_array($val)) {
- $result[$key] = self::arrayCopy($val);
- } elseif (is_object($val)) {
- $result[$key] = clone $val;
- } else {
- $result[$key] = $val;
- }
- }
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment