public static function findKey($params, $arg, $default = null)
    {
        if (is_object($params) === true)
        {
            $params = (array)$params;
        }

        if (isset($params[$arg]) === true)
        {
            $val = $params[$arg];
            unset($params[$arg]);

            return $val;
        } else
        {
            return $default;
        }
    }
public static function findKey($params, $arg, $default = null)
    {
        if (is_object($params) === true)
        {
            $params = (array)$params;
        }

        if (isset($params[$arg]) === true)
        {
            $val = $params[$arg];
            unset($params[$arg]);

            return $val;
        } else
        {
            return $default;
        }
    }
public static function findKey ( $ params , $ arg , $ default = null ) { if ( is_object ( $ params ) === true ) { $ params = ( array ) $ params ; } if ( isset ( $ params [ $ arg ] ) === true ) { $ val = $ params [ $ arg ] ; unset ( $ params [ $ arg ] ) ; return $ val ; } else { return $ default ; } }
Read and return parameters from an array.

@param array $params
@param string $arg

@param null $default
@return null|mixed
Read and return parameters from an array .