You are here

function describe_type in Auth0 Single Sign On 8.2

Debug function used to describe the provided value type and class.

Parameters

mixed $input:

Return value

string Returns a string containing the type of the variable and if a class is provided, the class name.

File

vendor/guzzlehttp/guzzle/src/functions.php, line 41

Namespace

GuzzleHttp

Code

function describe_type($input) {
  switch (gettype($input)) {
    case 'object':
      return 'object(' . get_class($input) . ')';
    case 'array':
      return 'array(' . count($input) . ')';
    default:
      ob_start();
      var_dump($input);

      // normalize float vs double
      return str_replace('double(', 'float(', rtrim(ob_get_clean()));
  }
}