Do not use functions not supported by older PHP.

This commit is contained in:
Michal Čihař
2005-11-28 18:21:19 +00:00
parent e988938d43
commit ea58d9f259
2 changed files with 14 additions and 10 deletions

View File

@@ -389,16 +389,18 @@ if ( ! defined( 'PMA_MINIMUM_COMMON' ) ) {
$is_float_digit = $c == '.';
$is_float_digit_exponent = FALSE;
// Nijel: Fast skip is especially needed for huge BLOB data:
if ($is_hex_digit) {
$count2++;
$pos = strspn($sql, '0123456789abcdefABCDEF', $count2);
if ($pos > $count2) $count2 = $pos;
unset($pos);
} elseif ($is_digit) {
$pos = strspn($sql, '0123456789', $count2);
if ($pos > $count2) $count2 = $pos;
unset($pos);
// Nijel: Fast skip is especially needed for huge BLOB data, requires PHP at least 4.3.0:
if (PMA_PHP_INT_VERSION >= 40300) {
if ($is_hex_digit) {
$count2++;
$pos = strspn($sql, '0123456789abcdefABCDEF', $count2);
if ($pos > $count2) $count2 = $pos;
unset($pos);
} elseif ($is_digit) {
$pos = strspn($sql, '0123456789', $count2);
if ($pos > $count2) $count2 = $pos;
unset($pos);
}
}
while (($count2 < $len) && PMA_STR_isSqlIdentifier(PMA_substr($sql, $count2, 1), ($is_sql_variable || $is_digit))) {