$alphabetSize = strlen($alphabet);
$result = '';
for ($i = 0; $i < $len; $i++) {
- $result .= $alphabet{rand(1, $alphabetSize) - 1};
+ $result .= $alphabet[rand(1, $alphabetSize) - 1];
}
return $result;
}
}
$defaultContainer = self::DEFAULT_URL;
- if ($value && $value{0} == '[' && preg_match(';^\[([a-zA-Z0-9\._]+)\](/(.*))$;', $value, $matches)) {
+ if ($value && $value[0] == '[' && preg_match(';^\[([a-zA-Z0-9\._]+)\](/(.*))$;', $value, $matches)) {
$defaultContainer = $matches[1];
$value = $matches[3];
}