private function reverse_chunk($s): string
    {
        $res = '';

        while (strlen($s)) {
            $pos = strpos($s, "\r\n");

            if ($pos === false) {
                $res .= $s;
                break;
            }

            $l = hexdec(substr($s, 0, $pos));
            $res .= substr($s, $pos + 2, $l);
            $s = substr($s, $l + $pos + 2);
        }

        return $res;
    }
private function reverse_chunk($s): string
    {
        $res = '';

        while (strlen($s)) {
            $pos = strpos($s, "\r\n");

            if ($pos === false) {
                $res .= $s;
                break;
            }

            $l = hexdec(substr($s, 0, $pos));
            $res .= substr($s, $pos + 2, $l);
            $s = substr($s, $l + $pos + 2);
        }

        return $res;
    }
private function reverse_chunk ( $ s ) : string { $ res = '' ; while ( strlen ( $ s ) ) { $ pos = strpos ( $ s , "\r\n" ) ; if ( $ pos === false ) { $ res .= $ s ; break ; } $ l = hexdec ( substr ( $ s , 0 , $ pos ) ) ; $ res .= substr ( $ s , $ pos + 2 , $ l ) ; $ s = substr ( $ s , $ l + $ pos + 2 ) ; } return $ res ; }
Makes one boyd string from chunks

@param string $s

@return string
Makes one boyd string from chunks