Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return part of a string
<?php substr(string $string, int $offset, ?int $length = null): string
<?php         foreach ($x_amz_params as $key => $value) {

            $query_string .= rawurlencode($key) . '=' . rawurlencode($value) . "&";

        }

        $query_string = substr($query_string, 0, -1);



        $canonical_request = "GET\n" . $encoded_uri . "\n" . $query_string . "\n" . $header_string . "\n" . $signed_headers_string . "\nUNSIGNED-PAYLOAD";

        $string_to_sign = $algorithm . "\n" . $time_text . "\n" . $scope . "\n" . hash('sha256', $canonical_request,
<?php         foreach ($x_amz_params as $key => $value) {

            $query_string .= rawurlencode($key) . '=' . rawurlencode($value) . "&";

        }

        $query_string = substr($query_string, 0, -1);



        $canonical_request = "GET\n" . $encoded_uri . "\n" . $query_string . "\n" . $header_string . "\n" . $signed_headers_string . "\nUNSIGNED-PAYLOAD";

        $string_to_sign = $algorithm . "\n" . $time_text . "\n" . $scope . "\n" . hash('sha256', $canonical_request,
<?php         foreach ($x_amz_params as $key => $value) {

            $query_string .= rawurlencode($key) . '=' . rawurlencode($value) . "&";

        }

        $query_string = substr($query_string, 0, -1);



        $canonical_request = "GET\n" . $encoded_uri . "\n" . $query_string . "\n" . $header_string . "\n" . $signed_headers_string . "\nUNSIGNED-PAYLOAD";

        $string_to_sign = $algorithm . "\n" . $time_text . "\n" . $scope . "\n" . hash('sha256', $canonical_request,
<?php             if ($part === '' || substr($part, -1) !== ']') {


                $array[$key] = $value;
<?php                 return;

            }



            $part = substr($part, 0, -1); // The last char is a ] => remove it to have the real key



            if ($part === '') { // [] case

                $pointer = &$pointer[];
<?php             curl_setopt($this->curlHandleNext, CURLOPT_FOLLOWLOCATION, true);

            curl_setopt($this->curlHandleNext, CURLOPT_FAILONERROR, true);


            $phpVersion = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.', 2));

            curl_setopt($this->curlHandleNext, CURLOPT_USERAGENT, "bref/{$this->layer}/$phpVersion");

        }