}
$str = explode(':', $str, 2);
- if (2 === count($str)) {
+ if (2 === \count($str)) {
if (isset($headers[$str[0]])) {
- if (!is_array($headers[$str[0]])) {
+ if (!\is_array($headers[$str[0]])) {
$headers[$str[0]] = array($headers[$str[0]]);
}
$headers[$str[0]][] = ltrim($str[1]);
}
$i = 1;
- $len = count($str);
+ $len = \count($str);
while ($i < $len) {
$c = strtolower($str[$i]);
public static function iconv_mime_encode($fieldName, $fieldValue, $pref = null)
{
- if (!is_array($pref)) {
+ if (!\is_array($pref)) {
$pref = array();
}
$lineBreak = (int) $pref['line-length'];
$lineStart = "=?{$pref['output-charset']}?{$scheme}?";
- $lineLength = strlen($fieldName) + 2 + strlen($lineStart) + 2;
- $lineOffset = strlen($lineStart) + 3;
+ $lineLength = \strlen($fieldName) + 2 + \strlen($lineStart) + 2;
+ $lineOffset = \strlen($lineStart) + 3;
$lineData = '';
$fieldValue = array();
}
$lineData .= $c;
- $Q && $lineLength += strlen($c);
+ $Q && $lineLength += \strlen($c);
}
if ('' !== $lineData) {
return false;
}
- return strlen(utf8_decode($s));
+ return \strlen(utf8_decode($s));
}
public static function strlen2($s, $encoding = null)
$i = 0;
$j = 0;
- $len = strlen($s);
+ $len = \strlen($s);
while ($i < $len) {
$u = $s[$i] & "\xF0";
$u = $str;
$i = $j = 0;
- $len = strlen($str);
+ $len = \strlen($str);
while ($i < $len) {
if ($str[$i] < "\x80") {
private static function mapToUtf8(&$result, array $map, $str, $ignore)
{
- $len = strlen($str);
+ $len = \strlen($str);
for ($i = 0; $i < $len; ++$i) {
if (isset($str[$i + 1], $map[$str[$i].$str[$i + 1]])) {
$result .= $map[$str[$i].$str[++$i]];
}
$i = 0;
- $len = strlen($str);
+ $len = \strlen($str);
while ($i < $len) {
if ($str[$i] < "\x80") {
}
$str = $uchr.substr($str, $i);
- $len = strlen($str);
+ $len = \strlen($str);
$i = 0;
} elseif (!$ignore) {
return false;
private static function qpByteCallback(array $m)
{
- return '='.strtoupper(dechex(ord($m[0])));
+ return '='.strtoupper(dechex(\ord($m[0])));
}
private static function pregOffset($offset)