function array_cast($obj) { //TODO: fix taints ? Maybe they are ok (see arrays manual entry on "converting to an array" //print_r($obj); if (is_scalar($obj[0])) { return array(array($obj), AspisTaintBareCopy($obj[1])); } else { if (is_object($obj[0])) { return array((array) $obj[0], AspisTaintBareCopy($obj[1])); } else { if (is_array($obj[0])) { return $obj; } else { if (is_null($obj[0])) { return array(array(), false); } } } } }
function Aspis_utf8_encode($str) { return array(utf8_encode($str[0]), AspisTaintBareCopy($str[1])); }