src/main/php/request/WebRequest.php
public function id(): string
    {
        if (null !== $this->id) {
            return $this->id;
        }

        if ($this->headers->contain('HTTP_X_REQUEST_ID')) {
            $this->id = $this->readHeader('HTTP_X_REQUEST_ID')
                    ->ifMatches('~^([a-zA-Z0-9+/=-]{20,200})$~');
        }

        if (null === $this->id) {
            $this->id = substr(str_shuffle(md5(microtime())), 0, 25);
        }

        return $this->id;
    }
public function id(): string
    {
        if (null !== $this->id) {
            return $this->id;
        }

        if ($this->headers->contain('HTTP_X_REQUEST_ID')) {
            $this->id = $this->readHeader('HTTP_X_REQUEST_ID')
                    ->ifMatches('~^([a-zA-Z0-9+/=-]{20,200})$~');
        }

        if (null === $this->id) {
            $this->id = substr(str_shuffle(md5(microtime())), 0, 25);
        }

        return $this->id;
    }
public function id ( ) : string { if ( null !== $ this -> id ) { return $ this -> id ; } if ( $ this -> headers -> contain ( 'HTTP_X_REQUEST_ID' ) ) { $ this -> id = $ this -> readHeader ( 'HTTP_X_REQUEST_ID' ) -> ifMatches ( '~^([a-zA-Z0-9+/=-]{20,200})$~' ) ; } if ( null === $ this -> id ) { $ this -> id = substr ( str_shuffle ( md5 ( microtime ( ) ) ) , 0 , 25 ) ; } return $ this -> id ; }
returns id of the request

The id of the request may come from an optional X-Request-ID header. The
value must be between 20 and 200 characters, and consist of ASCII
letters, digits, or the characters +, /, =, and -. Invalid or missing ids
will be ignored and replaced with generated ones.

@return  string
@since   4.2.0
@see     https://devcenter.heroku.com/articles/http-request-id
returns id of the request