Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debug functions
<?php
function l( $data ) {
error_log( print_r( $data, true ) );
}
function lv( $data ) {
ob_start();
var_dump( $data );
error_log( ob_get_clean() );
}
function d( $data ) {
echo '<pre>';
print_r( $data );
echo '</pre>';
}
function dd( $data ) {
d( $data );
die;
}
function v( $data ) {
echo '<pre>';
var_dump( $data );
echo '</pre>';
}
function vd( $data ) {
vd( $data );
die;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.