Skip to content

Instantly share code, notes, and snippets.

@alysivji
Created February 28, 2018 16:17
Show Gist options
  • Save alysivji/060c02538b6be572c65583151c7f4401 to your computer and use it in GitHub Desktop.
Save alysivji/060c02538b6be572c65583151c7f4401 to your computer and use it in GitHub Desktop.
PHP snippets
if ( ! function_exists('write_log')) {
function write_log ( $log ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment