private function formatMemory($bytes)
    {
        $units = ['B', 'KiB', 'MiB', 'GiB'];
        $mod = 1024;
        $power = ($bytes > 0) ? (int) floor(log($bytes, $mod)) : 0;

        return sprintf('%01.2f %s', $bytes / pow($mod, $power), $units[$power]);
    }
private function formatMemory($bytes)
    {
        $units = ['B', 'KiB', 'MiB', 'GiB'];
        $mod = 1024;
        $power = ($bytes > 0) ? (int) floor(log($bytes, $mod)) : 0;

        return sprintf('%01.2f %s', $bytes / pow($mod, $power), $units[$power]);
    }
private function formatMemory ( $ bytes ) { $ units = [ 'B' , 'KiB' , 'MiB' , 'GiB' ] ; $ mod = 1024 ; $ power = ( $ bytes > 0 ) ? ( int ) floor ( log ( $ bytes , $ mod ) ) : 0 ; return sprintf ( '%01.2f %s' , $ bytes / pow ( $ mod , $ power ) , $ units [ $ power ] ) ; }
Method to format memory usage to human readable format.

@param int $bytes

@return string
Method to format memory usage to human readable format .