Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Applies the callback to the elements of the given arrays
array_map(?callable $callback, array $array, array ...$arrays): array
    foreach (array_chunk($processes4) as $batch) {


        
array_map(function (Process $process): void {

            
$process->start();

        }, 
$batch);


        
array_map(function (Process $process): void {

            
$status $process->wait();
            $process->start();

        }, 
$batch);


        
array_map(function (Process $process): void {

            
$status $process->wait();

            echo 
'.';


            if (
$status !== 0) {

                echo 
'Process ' $process->getCommandLine() . ' failed:' PHP_EOL;

                echo 
$process->getErrorOutput();

                echo 
$process->getOutput();

                exit(
1);

            }

        }, 
$batch);

    }

}
    $notLoaded array_diff($devExtensions$output);


    if (
$exitCode !== || count($notLoaded) > 0) {

        throw new 
Exception(implode(PHP_EOLarray_map(function ($extension) {

            return 
"Extension $extension is not loaded";

        }, 
$notLoaded)), $exitCode);

    }

    echo 
'.';

}
        $arguments array_map(static function (string $arg): string {

            return 
escapeshellarg($arg);

        }, 
$arguments);



        try {

            
$result $lambda->invoke($functionjson_encode(implode(' '$arguments)));
    public function getRecords(): array

    {

        return 
array_map(

            function (
$record): DynamoDbRecord {

                try {

                    return new 
DynamoDbRecord($record);

                } catch (
\InvalidArgumentException $e) {

                    throw new 
InvalidLambdaEvent('DynamoDb'$this->event);

                }

            },

            
$this->event['Records']

        );

    }



    public function 
toArray(): array
        } else {

            
$headers $this->event['headers'] ?? [];


            
$headers array_map(function ($value): array {

                return [
$value];

            }, 
$headers);

        }

        
$headers array_change_key_case($headersCASE_LOWER);
    public function getRecords(): array

    {

        return 
array_map(

            function (
$record): KinesisRecord {

                try {

                    return new 
KinesisRecord($record);

                } catch (
\InvalidArgumentException $e) {

                    throw new 
InvalidLambdaEvent('Kinesis'$this->event);

                }

            },

            
$this->event['Records']

        );

    }



    public function 
toArray(): array
    public function getRecords(): array

    {

        return 
array_map(function ($record): S3Record {

            try {

                return new 
S3Record($record);

            } catch (
InvalidArgumentException $e) {

                throw new 
InvalidLambdaEvent('S3'$this->event);

            }

        }, 
$this->event['Records']);

    }



    public function 
toArray(): array
    public function getRecords(): array

    {

        return 
array_map(function ($record): SnsRecord {

            try {

                return new 
SnsRecord($record);

            } catch (
InvalidArgumentException $e) {

                throw new 
InvalidLambdaEvent('SNS'$this->event);

            }

        }, 
$this->event['Records']);

    }



    public function 
toArray(): array
    public function getMessageAttributes(): array

    {

        return 
array_map(function (array $attribute): MessageAttribute {

            return new 
MessageAttribute($attribute);

        }, 
$this->record['Sns']['MessageAttributes']);

    }



    public function 
getTopicArn(): string
    public function getRecords(): array

    {

        return 
array_map(function ($record): SqsRecord {

            try {

                return new 
SqsRecord($record);

            } catch (
InvalidArgumentException $e) {

                throw new 
InvalidLambdaEvent('SQS'$this->event);

            }

        }, 
$this->event['Records']);

    }



    public function 
toArray(): array
            return;

        }



        
$failures array_map(

            function (
SqsRecord $record) {

                return [
'itemIdentifier' => $record->getMessageId()];

            },

            
$this->failedRecords

        
);



        return [

            
'batchItemFailures' => $failures,
        $this->assertEquals($expected$this->event->getCookies());




        
$expectedHeader array_map(function (string $valuestring $key): string {

            return 
$key '=' urlencode($value);

        }, 
$expectedarray_keys($expected));

        
$this->assertEquals(implode('; '$expectedHeader), $this->event->getHeaders()['cookie'][0] ?? '');

    }
echo json_encode([

    
'$_GET' => $_GET,

    
'$_POST' => $_POST,

    
'$_FILES' => array_map(function ($file) {


        
$file['content'] = file_get_contents($file['tmp_name']);


        
unlink($file['tmp_name']);

        unset(
$file['tmp_name']);

        return 
$file;

    }, 
$_FILES),

    
'$_COOKIE' => $_COOKIE,

    
'$_REQUEST' => $_REQUEST,

    
'$_SERVER' => $_SERVER,
            if (! ($response instanceof ResponseInterface)) {

                throw new 
\Exception('Invalid response given.');

            }

            
$headers array_map(function ($h) {

                return 
implode(' ,'$h);

            }, 
$response->getHeaders());

            
$data[] = [

                
'status'  => (string) $response->getStatusCode(),

                
'reason'  => $response->getReasonPhrase(),