From dc5be15a6f9cfb2776b50b3f363ffb26668a6a52 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 26 Dec 2006 16:45:39 +0000 Subject: [PATCH] is_numeric_string() optimization --- ext/standard/type.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/standard/type.c b/ext/standard/type.c index ada33fb091..9f53639680 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -305,7 +305,6 @@ PHP_FUNCTION(is_object) PHP_FUNCTION(is_numeric) { zval **arg; - int result; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { WRONG_PARAM_COUNT; @@ -318,8 +317,7 @@ PHP_FUNCTION(is_numeric) break; case IS_STRING: - result = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), NULL, NULL, 0); - if (result == IS_LONG || result == IS_DOUBLE) { + if (is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), NULL, NULL, 0)) { RETURN_TRUE; } else { RETURN_FALSE; -- 2.50.1