iliaa           Tue Dec 26 16:45:39 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       type.c 
  Log:
  is_numeric_string() optimization
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.30.2.2&r2=1.30.2.2.2.1&diff_format=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.30.2.2 
php-src/ext/standard/type.c:1.30.2.2.2.1
--- php-src/ext/standard/type.c:1.30.2.2        Sun Jan  1 12:50:15 2006
+++ php-src/ext/standard/type.c Tue Dec 26 16:45:39 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: type.c,v 1.30.2.2 2006/01/01 12:50:15 sniper Exp $ */
+/* $Id: type.c,v 1.30.2.2.2.1 2006/12/26 16:45:39 iliaa Exp $ */
 
 #include "php.h"
 #include "php_incomplete_class.h"
@@ -305,7 +305,6 @@
 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 @@
                        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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to