Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Join array elements with a string
Alias join
implode(string $separator, array $array): string
    if (strpos($layer'php-8') === false) {

        
exec("docker run --rm -v \${PWD}/helpers:/var/task/ --entrypoint /var/task/extensions-test.sh $layer"$output$exitCode);

        if (
$exitCode !== 0) {

            throw new 
Exception(implode(PHP_EOL$output), $exitCode);

        }

        echo 
'.';

    }
    $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);



        try {

            
$result $lambda->invoke($functionjson_encode(implode(' '$arguments)));

        } catch (
InvocationFailed $e) {

            
$io->getErrorStyle()->writeln('<info>' $e->getInvocationLogs() . '</info>');

            
$io->error($e->getMessage());
            parse_str(implode('&'$queryParameterStr), $queryParameters);

            return 
http_build_query($queryParameters);

        }
        if (! empty($this->event['cookies']) && $this->isFormatV2()) {

            
$cookieHeader implode('; '$this->event['cookies']);

            
$headers['cookie'] = [$cookieHeader];

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

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

        }, 
$expectedarray_keys($expected));

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

    }



    protected function 
assertHeaders(array $expected): void
    {

        
$string '';

        foreach (
$response->getHeaders() as $name => $values) {

            
$string .= $name ': ' implode(', '$values) . "\n";

        }

        
$string .= "\n" $this->getBody($response) . "\n";
    {

        
$string '';

        foreach (
$response->getHeaders() as $name => $values) {

            
$string .= $name ': ' implode(', '$values) . "\n";

        }

        
$string .= "\n" $this->getBody($response) . "\n";
                throw new \Exception('Invalid response given.');

            }

            
$headers array_map(function ($h) {

                return 
implode(' ,'$h);

            }, 
$response->getHeaders());

            
$data[] = [

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