I have created a few utility functions like one h()
that acts as echo htmlentities($var)
. I want theses functions to be available everywhere . so
Use codeigniter-kint and a custom file for global Functions. This will give you a more helpful and beautiful Output like:
File: application/helpers/globalfunctions_helper.php
load->library('kint');
return @Kint::dump($value);
}
}
if(!function_exists('dp')){
function dp($value=false)
{
$CI = get_instance();
$CI->load->library('kint');
Kint::dump($value);
die();
}
}
See also: http://raveren.github.io/kint/