Skip to content

Instantly share code, notes, and snippets.

@stilliard
Created January 20, 2014 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stilliard/8517956 to your computer and use it in GitHub Desktop.
Save stilliard/8517956 to your computer and use it in GitHub Desktop.
Dump the given value to stdout
<?php
/**
* Dump the given value to stdout
*
* @param mixed $value
* @return void
*/
function dout($value)
{
ob_start();
var_dump($value);
$contents = ob_get_contents();
ob_end_clean();
file_put_contents('php://stdout', $contents);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment