Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DeepCopy.php

function DeepCopy::copyArray

Copy an array

Parameters

array $array:

Return value

array

1 call to DeepCopy::copyArray()
DeepCopy::recursiveCopy in vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php

File

vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php, line 161

Class

DeepCopy
@final

Namespace

DeepCopy

Code

private function copyArray(array $array) {
    foreach ($array as $key => $value) {
        $array[$key] = $this->recursiveCopy($value);
    }
    return $array;
}
RSS feed
Powered by Drupal