You are here

function debug_resource in Lockr 7.3

Returns a debug stream based on the provided variable.

Parameters

mixed $value Optional value:

Return value

resource

File

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

Namespace

GuzzleHttp

Code

function debug_resource($value = null) {
  if (is_resource($value)) {
    return $value;
  }
  elseif (defined('STDOUT')) {
    return STDOUT;
  }
  return fopen('php://output', 'w');
}