common functions
- debuggable - check if debugging enabled
- ifelse - shorter inline if
- shorten - string shortener to given lenght
debuggable()
returns true if debug info allowed for your ip and debugging is enabled. if ips are not set, debug info only visible to myportal loged users.
if(debuggable()){ $DB->debug = true; print_r($_SESSION); ... }
ifelse($if,$else=false)
shorter syntax for
$a = $a ? $a : $b; //shorter $a = ifelse($a,''); // return '' if $a is false else $a $a = ifelse($a); // return false if $a is false else $a
shorten($string,$len)
string shortener to given lenght
echo shorten('123456789',3); // 123...







