Vardump is an alternative version of the function with the same PHP name used for debugging errors and displaying values. Originally created to display the debugging of the dbw class, started inside the main container as $wv->db, is an alias of the $wv->db->vardump() method.
This function is able to evaluate the different types of values that are evaluated as empty by empty, returning an "EMPTY:::" message followed by the type of variable, differentiating an empty string, a zero as string, a zero as integer, a zero as double, false, null, strings that only include invisible characters (space, tab and line break), empty arrays and empty objects. Arrays and multidimensional objects are also detected when they are empty, but in this case they show their structure, as they can be important for debugging.
When the variable, array or object contains data, it is displayed, with its structure in the case of arrays or objects.
This is an example of use with empty variables, arrays and objects:
$a = "0"; $b = 0; $c = 0.0000000; $d = " "; $e = ""; $f = false; $g = null; $h = ; $i = (object); $j = [[[""," "]]]; $k = (object)[(object)[(object)[""," "]]]; $wv->vardump($a); $wv->vardump($b); $wv->vardump($c); $wv->vardump($d); $wv->vardump($e); $wv->vardump($f); $wv->vardump($g); $wv->vardump($h); $wv->vardump($i); $wv->vardump($j); $wv->vardump($k);
EMPTY::Var="" (string) - Blank chars detected!
EMPTY::Var=NULL (or not set)
SHOWING::Array (  => Array (  => Array (  =>  => ) ) )
SHOWING::stdClass Object (  => stdClass Object (  => stdClass Object (  =>  => ) ) )