Skip to content

Instantly share code, notes, and snippets.

@anytizer
Created March 24, 2016 09:53
Show Gist options
  • Save anytizer/0e54919be2b6e4c38702 to your computer and use it in GitHub Desktop.
Save anytizer/0e54919be2b6e4c38702 to your computer and use it in GitHub Desktop.
Grabs the data passing between PHP functions
class trap
{
public static function parameters($mixed)
{
file_put_contents('/tmp/parameters-'.date('YmdH').'.log', "\r\n\r\n".print_r($mixed, true), FILE_APPEND);
}
public static function sql($mixed)
{
file_put_contents('/tmp/sql-'.date('YmdH').'.log', "\r\n\r\n".print_r($mixed, true), FILE_APPEND);
}
public static function post($mixed)
{
file_put_contents('/tmp/post-'.date('YmdH').'.log', "\r\n\r\n".print_r($mixed, true), FILE_APPEND);
}
public static function get($mixed)
{
file_put_contents('/tmp/get-'.date('YmdH').'.log', "\r\n\r\n".print_r($mixed, true), FILE_APPEND);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment