- return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys);
+ return iterator_to_array(new LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys);
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
* Check if the current character to escape has a name entity we should
* replace it with while grabbing the hex value of the character.
*/
* Check if the current character to escape has a name entity we should
* replace it with while grabbing the hex value of the character.
*/
$hex = strtoupper(substr('00'.bin2hex($chr), -2));
} else {
$chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');
$hex = strtoupper(substr('00'.bin2hex($chr), -2));
} else {
$chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');
if (is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) {
return mb_strlen((string) $thing, $env->getCharset());
}
if (is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) {
return mb_strlen((string) $thing, $env->getCharset());
}
if (is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) {
return strlen((string) $thing);
}
if (is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) {
return strlen((string) $thing);
}