Пример #1
0
        // 2 digit lang code
        $code = $found[1];
        // lang code complement
        $morecode = $found[3];
        // full lang code
        $fullcode = $morecode ? $code . '-' . $morecode : $code;
        // coefficient
        $coef = sprintf('%3.1f', $found[5] ? $found[5] : '1');
        // for sorting by coefficient
        $key = $coef . '-' . $code;
        // adding
        $accepted[$key] = array('code' => $code, 'coef' => $coef, 'morecode' => $morecode, 'fullcode' => $fullcode);
    }
    // sorting the list by coefficient desc
    krsort($accepted);
    return $accepted;
}
class SomeClass
{
    public function __init()
    {
        # do something
        throw new Exception('pipo');
    }
    public static function pipo($var)
    {
        return $var + 12;
    }
}
SomeClass::pipo(12);