]> granicus.if.org Git - php/commitdiff
(PHP array_map) Temporarily #if 0 this.
authorAndrei Zmievski <andrei@php.net>
Fri, 15 Oct 1999 21:24:15 +0000 (21:24 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 15 Oct 1999 21:24:15 +0000 (21:24 +0000)
ext/standard/basic_functions.c

index 7385daaf5d03027a9648e03674dd54fe12d5dad3..34033711d4a6886d427a14f0583cc88b3c4c790a 100644 (file)
@@ -2458,7 +2458,7 @@ PHP_FUNCTION(shuffle)
                php_error(E_WARNING, "Wrong datatype in shuffle() call");
                return;
        }
-       if (zend_hash_sort((*array)->value.ht, mergesort, array_data_shuffle, 1) == FAILURE) {
+       if (zend_hash_sort((*array)->value.ht, (sort_func_t)mergesort, array_data_shuffle, 1) == FAILURE) {
                return;
        }
        RETURN_TRUE;
@@ -3142,13 +3142,16 @@ PHP_FUNCTION(array_reverse)
 }
 /* }}} */
 
+
+#if 0
 /* {{{ proto array array_map(array input, string value_exp [, string key_exp] */
 PHP_FUNCTION(array_map)
 {
-       zval            **input;
-       zval            **value_exp;
-       zval            **key_exp = NULL;
-       int                       argc;
+       zval**          input;
+       zval**          value_exp;
+       zval**          key_exp = NULL;
+       zval**          entry;
+       int                     argc;
        
        argc = ARG_COUNT(ht);
        
@@ -3157,11 +3160,23 @@ PHP_FUNCTION(array_map)
        }
        
        if ((*input)->type != IS_ARRAY) {
-               php_error(E_WARNING, "First argument to %s should be an array",
+               php_error(E_WARNING, "First argument to %s() should be an array",
                                get_active_function_name());
+               return;
        }
+       
+       convert_to_string_ex(value_exp);
+       if (key_exp)
+               convert_to_string_ex(key_exp);
+       
+       zend_hash_internal_pointer_reset((*input)->value.ht);
+       while(zend_hash_get_current_data((*input)->value.ht, (void **)&entry) == SUCCESS) {
+               
+               
+               zend_hash_move_forward((*input)->value.ht);
+       }               
 }
-
+#endif
 
 /*
  * Local variables: