public static function varToText($var) {
				
		$type = gettype($var);
		$text = is_null($type) ? 'NULL' : $type . ':';
		
		switch ($type) {

			case 'boolean':
				$text .= $var ? 'TRUE' : 'FALSE';
				break;

			default:
				$text .= $var;
				break;
				
			case 'array':
				$parts = array();
				foreach ($var as $k=>$v) {
					$parts[] = $k . '=>' . self::varToText($v);
				}
				$text .= 'array:[' . implode(',', $parts) . ']';
				break;
				
			case 'object':
				$text .= get_class($var);
				break;
				
			case 'NULL':
				break;

		}
					
		return $text;
		
	}
public static function varToText($var) {
				
		$type = gettype($var);
		$text = is_null($type) ? 'NULL' : $type . ':';
		
		switch ($type) {

			case 'boolean':
				$text .= $var ? 'TRUE' : 'FALSE';
				break;

			default:
				$text .= $var;
				break;
				
			case 'array':
				$parts = array();
				foreach ($var as $k=>$v) {
					$parts[] = $k . '=>' . self::varToText($v);
				}
				$text .= 'array:[' . implode(',', $parts) . ']';
				break;
				
			case 'object':
				$text .= get_class($var);
				break;
				
			case 'NULL':
				break;

		}
					
		return $text;
		
	}
public static function varToText ( $ var ) { $ type = gettype ( $ var ) ; $ text = is_null ( $ type ) ? 'NULL' : $ type . ':' ; switch ( $ type ) { case 'boolean' : $ text .= $ var ? 'TRUE' : 'FALSE' ; break ; default : $ text .= $ var ; break ; case 'array' : $ parts = array ( ) ; foreach ( $ var as $ k => $ v ) { $ parts [ ] = $ k . '=>' . self :: varToText ( $ v ) ; } $ text .= 'array:[' . implode ( ',' , $ parts ) . ']' ; break ; case 'object' : $ text .= get_class ( $ var ) ; break ; case 'NULL' : break ; } return $ text ; }
Creates a plain text string from any variable type.

@param	multitype	Variable of any type.
@return	string
Creates a plain text string from any variable type .