You are here

function debug_resource in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/guzzle/src/functions.php \GuzzleHttp\debug_resource()

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 85

Namespace

GuzzleHttp

Code

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