Skip to content

Instantly share code, notes, and snippets.

alias.addnw=!sh -c 'git diff -U0 -w --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -'
@sambfreund
sambfreund / Globals
Created July 13, 2016 19:58
Display global information - small snippit
echo "<pre>";
print_r($GLOBALS);
echo "</pre>";
@sambfreund
sambfreund / Find Function
Created July 7, 2016 15:15
This finds a function's origin. Useful in files with multiple include files. I don't take credit for this, but just don't remember where I found it.
$reflFunc = new ReflectionFunction('FUNCTION NAME');
print $reflFunc->getFileName() . ':' . $reflFunc->getStartLine();