strtoupper example


function redirect_canonical( $requested_url = null, $do_redirect = true ) {
    global $wp_rewrite$is_IIS$wp_query$wpdb$wp;

    if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ), true ) ) {
        return;
    }

    /* * If we're not in wp-admin and the post has been published and preview nonce * is non-existent or invalid then no need for preview in query. */
    if ( is_preview() && get_query_var( 'p' ) && 'publish' === get_post_status( get_query_var( 'p' ) ) ) {
        if ( ! isset( $_GET['preview_id'] )
            || ! isset( $_GET['preview_nonce'] )
            || ! wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . (int) $_GET['preview_id'] )
        )

    }

    /** * Get the request method. Overrides the Request class' method * since users expect a different answer here. * * @param bool|false $upper Whether to return in upper or lower case. */
    public function getMethod(bool $upper = false): string
    {
        return ($upper) ? strtoupper($this->method) : strtolower($this->method);
    }

    /** * Fires the actual cURL request. * * @return ResponseInterface */
    public function send(string $method, string $url)
    {
        // Reset our curl options so we're on a fresh slate.         $curlOptions = [];

        

    public function filter( $args = array()$operator = 'AND' ) {
        if ( empty( $args ) ) {
            return $this->output;
        }

        $operator = strtoupper( $operator );

        if ( ! in_array( $operator, array( 'AND', 'OR', 'NOT' ), true ) ) {
            $this->output = array();
            return $this->output;
        }

        $count    = count( $args );
        $filtered = array();

        foreach ( $this->output as $key => $obj ) {
            $matched = 0;

            
// Numeric timezone             if ($match[8] !== '')
            {
                $timezone = $match[9] * 3600;
                $timezone += $match[10] * 60;
                if ($match[8] === '-')
                {
                    $timezone = 0 - $timezone;
                }
            }
            // Character timezone             elseif (isset($this->timezone[strtoupper($match[11])]))
            {
                $timezone = $this->timezone[strtoupper($match[11])];
            }
            // Assume everything else to be -0000             else
            {
                $timezone = 0;
            }

            // Deal with 2/3 digit years             if ($match[4] < 50)
            {


    /** * Checks to see if editor supports the mime-type specified. * * @since 3.5.0 * * @param string $mime_type * @return bool */
    public static function supports_mime_type( $mime_type ) {
        $imagick_extension = strtoupper( self::get_extension( $mime_type ) );

        if ( ! $imagick_extension ) {
            return false;
        }

        /* * setIteratorIndex is optional unless mime is an animated format. * Here, we just say no if you are missing it and aren't loading a jpeg. */
        if ( ! method_exists( 'Imagick', 'setIteratorIndex' ) && 'image/jpeg' !== $mime_type ) {
                return false;
        }
$precision = $matches[1];
                $scale = $matches[2];
            } else if (preg_match('/^float\((\d+),(\d+)\)/', $row[$type]$matches)) {
                $row[$type] = 'float';
                $precision = $matches[1];
                $scale = $matches[2];
            } else if (preg_match('/^((?:big|medium|small|tiny)?int)\((\d+)\)/', $row[$type]$matches)) {
                $row[$type] = $matches[1];
                // The optional argument of a MySQL int type is not precision                 // or length; it is only a hint for display width.             }
            if (strtoupper($row[$key]) == 'PRI') {
                $primary = true;
                $primaryPosition = $p;
                if ($row[$extra] == 'auto_increment') {
                    $identity = true;
                } else {
                    $identity = false;
                }
                ++$p;
            }
            $desc[$this->foldCase($row[$field])] = array(
                'SCHEMA_NAME'      => null, // @todo
if ( ! empty( $this->meta_query->queries ) ) {
            $clauses            = $this->meta_query->get_sql( 'user', $wpdb->users, 'ID', $this );
            $this->query_from  .= $clauses['join'];
            $this->query_where .= $clauses['where'];

            if ( $this->meta_query->has_or_relation() ) {
                $this->query_fields = 'DISTINCT ' . $this->query_fields;
            }
        }

        // Sorting.         $qv['order'] = isset( $qv['order'] ) ? strtoupper( $qv['order'] ) : '';
        $order       = $this->parse_order( $qv['order'] );

        if ( empty( $qv['orderby'] ) ) {
            // Default order is by 'user_login'.             $ordersby = array( 'user_login' => $order );
        } elseif ( is_array( $qv['orderby'] ) ) {
            $ordersby = $qv['orderby'];
        } else {
            // 'orderby' values may be a comma- or space-separated list.             $ordersby = preg_split( '/[,\s]+/', $qv['orderby'] );
        }

        


    /** * @return bool */
    public static function checkdnsrr($hostname$type = 'MX')
    {
        if (!self::$hosts) {
            return \checkdnsrr($hostname$type);
        }
        if (isset(self::$hosts[$hostname])) {
            $type = strtoupper($type);

            foreach (self::$hosts[$hostname] as $record) {
                if ($record['type'] === $type) {
                    return true;
                }
                if ('ANY' === $type && isset(self::$dnsTypes[$record['type']]) && 'HINFO' !== $record['type']) {
                    return true;
                }
            }
        }

        
        Services::routes()->loadRoutes();

        $filterCollector = new FilterCollector();

        $filters = $filterCollector->get($method$route);

        // PageNotFoundException         if ($filters['before'] === ['<unknown>']) {
            CLI::error(
                "Can't find a route: " .
                CLI::color(
                    '"' . strtoupper($method) . ' ' . $route . '"',
                    'black',
                    'light_gray'
                ),
            );

            return EXIT_ERROR;
        }

        $tbody[] = [
            strtoupper($method),
            $route,
            
/** * Normalizes the method. * * @param string $method * The request method. * * @return string * The normalized request method. */
  protected function normalizeRestMethod($method) {
    return strtoupper($method);
  }

  /** * {@inheritdoc} */
  public function postSave(EntityStorageInterface $storage$update = TRUE) {
    parent::postSave($storage$update);

    \Drupal::service('router.builder')->setRebuildNeeded();
  }

  
foreach ($routes as $item) {
                $route = $item['route'] . $item['route_params'];

                // For module routing                 if ($this->prefix !== '' && $route === '/') {
                    $route = $this->prefix;
                } elseif ($this->prefix !== '') {
                    $route = $this->prefix . '/' . $route;
                }

                $tbody[] = [
                    strtoupper($item['method']) . '(auto)',
                    $route,
                    '',
                    $item['handler'],
                    $item['before'],
                    $item['after'],
                ];
            }
        }

        return $tbody;
    }

    
$this->leftFormula = $configuration['left_formula'];
    }

    if (!empty($configuration['extra'])) {
      $this->extra = $configuration['extra'];
    }

    if (isset($configuration['adjusted'])) {
      $this->adjusted = $configuration['adjusted'];
    }

    $this->extraOperator = strtoupper($configuration['extra_operator']);
    $this->type = $configuration['type'];
  }

  /** * {@inheritdoc} */
  public function buildJoin($select_query$table$view_query) {
    if (empty($this->configuration['table formula'])) {
      $right_table = $this->table;
    }
    else {
      
'plugins' => $js_plugins,
                'totals'  => wp_get_update_data(),
            )
        );

        if ( ! $orderby ) {
            $orderby = 'Name';
        } else {
            $orderby = ucfirst( $orderby );
        }

        $order = strtoupper( $order );

        uasort( $this->items, array( $this, '_order_callback' ) );

        $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 );

        $start = ( $page - 1 ) * $plugins_per_page;

        if ( $total_this_page > $plugins_per_page ) {
            $this->items = array_slice( $this->items, $start$plugins_per_page );
        }

        
$GUIDstring .= '-';
        $GUIDstring .= str_pad(dechex(ord($Bytestring[8])),  2, '0', STR_PAD_LEFT);
        $GUIDstring .= str_pad(dechex(ord($Bytestring[9])),  2, '0', STR_PAD_LEFT);
        $GUIDstring .= '-';
        $GUIDstring .= str_pad(dechex(ord($Bytestring[10])), 2, '0', STR_PAD_LEFT);
        $GUIDstring .= str_pad(dechex(ord($Bytestring[11])), 2, '0', STR_PAD_LEFT);
        $GUIDstring .= str_pad(dechex(ord($Bytestring[12])), 2, '0', STR_PAD_LEFT);
        $GUIDstring .= str_pad(dechex(ord($Bytestring[13])), 2, '0', STR_PAD_LEFT);
        $GUIDstring .= str_pad(dechex(ord($Bytestring[14])), 2, '0', STR_PAD_LEFT);
        $GUIDstring .= str_pad(dechex(ord($Bytestring[15])), 2, '0', STR_PAD_LEFT);

        return strtoupper($GUIDstring);
    }

    /** * @param int $FILETIME * @param bool $round * * @return float|int */
    public static function FILETIMEtoUNIXtime($FILETIME$round=true) {
        // FILETIME is a 64-bit unsigned integer representing         // the number of 100-nanosecond intervals since January 1, 1601


        $value = (string) $value;
        if ('' === $value) {
            return;
        }

        if ('UTF-8' !== $this->charset) {
            $value = mb_convert_encoding($value, 'UTF-8', $this->charset);
        }

        $hash = strtoupper(sha1($value));
        $hashPrefix = substr($hash, 0, 5);
        $url = sprintf($this->endpoint, $hashPrefix);

        try {
            $result = $this->httpClient->request('GET', $url['headers' => ['Add-Padding' => 'true']])->getContent();
        } catch (ExceptionInterface $e) {
            if ($constraint->skipOnError) {
                return;
            }

            throw $e;
        }
Home | Imprint | This part of the site doesn't use cookies.