src/Debug.php
public static function formatRequestData($asString = true)
    {
        $fromServer = array(
            'REQUEST_URI',
            'REQUEST_METHOD',
            'HTTP_REFERER',
            'QUERY_STRING',
            'HTTP_USER_AGENT',
            'REMOTE_ADDR',
        );

        if($asString) {
            $s = "\n\n";
            $s .= isset($_REQUEST)? "REQUEST: " . print_r($_REQUEST, true) . PHP_EOL   : '';
            foreach ($fromServer as $item) {
                $s .= isset($_SERVER[$item]) ? "{$item}: {$_SERVER[$item]}\n" : '';
            }
        } else {
            $s = array(
                'REQUEST' => $_REQUEST,
                'SERVER'  => $_SERVER,
            );
        }

        return $s;
    }
public static function formatRequestData($asString = true)
    {
        $fromServer = array(
            'REQUEST_URI',
            'REQUEST_METHOD',
            'HTTP_REFERER',
            'QUERY_STRING',
            'HTTP_USER_AGENT',
            'REMOTE_ADDR',
        );

        if($asString) {
            $s = "\n\n";
            $s .= isset($_REQUEST)? "REQUEST: " . print_r($_REQUEST, true) . PHP_EOL   : '';
            foreach ($fromServer as $item) {
                $s .= isset($_SERVER[$item]) ? "{$item}: {$_SERVER[$item]}\n" : '';
            }
        } else {
            $s = array(
                'REQUEST' => $_REQUEST,
                'SERVER'  => $_SERVER,
            );
        }

        return $s;
    }
public static function formatRequestData ( $ asString = true ) { $ fromServer = array ( 'REQUEST_URI' , 'REQUEST_METHOD' , 'HTTP_REFERER' , 'QUERY_STRING' , 'HTTP_USER_AGENT' , 'REMOTE_ADDR' , ) ; if ( $ asString ) { $ s = "\n\n" ; $ s .= isset ( $ _REQUEST ) ? "REQUEST: " . print_r ( $ _REQUEST , true ) . PHP_EOL : '' ; foreach ( $ fromServer as $ item ) { $ s .= isset ( $ _SERVER [ $ item ] ) ? "{$item}: {$_SERVER[$item]}\n" : '' ; } } else { $ s = array ( 'REQUEST' => $ _REQUEST , 'SERVER' => $ _SERVER , ) ; } return $ s ; }
Returns all request data formated into string
@return string
Returns all request data formated into string