summaryrefslogtreecommitdiff
path: root/ext/standard/type.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-26 16:45:39 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-26 16:45:39 +0000
commitdc5be15a6f9cfb2776b50b3f363ffb26668a6a52 (patch)
tree14b07934782ac82ef7e64d9182ad0dd24f8c6e49 /ext/standard/type.c
parentff9d0fcc783c19d729ae475fe8baf76d94a003a9 (diff)
downloadphp-git-dc5be15a6f9cfb2776b50b3f363ffb26668a6a52.tar.gz
is_numeric_string() optimization
Diffstat (limited to 'ext/standard/type.c')
-rw-r--r--ext/standard/type.c4
1 files changed, 1 insertions, 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;