str::upper PHP Method

upper() static public method

An UTF-8 safe version of strotoupper()
static public upper ( string $str ) : string
$str string
return string
    static function upper($str)
    {
        return mb_strtoupper($str, 'UTF-8');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Gets a value from the _SERVER array
  * 
  * <code>
  * 
  * server::get('document_root');
  * // sample output: /var/www/kirby
  * 
  * server::get();
  * // returns the whole server array
  *
  * </code>   
  *
  * @param  mixed    $key The key to look for. Pass false or null to return the entire server array. 
  * @param  mixed    $default Optional default value, which should be returned if no element has been found
  * @return mixed
  */
 public static function get($key = false, $default = null)
 {
     if (empty($key)) {
         return $_SERVER;
     }
     return a::get($_SERVER, str::upper($key), $default);
 }
All Usage Examples Of str::upper