Back to index

php5  5.3.10
basic_functions.c
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Andi Gutmans <andi@zend.com>                                |
00016    |          Zeev Suraski <zeev@zend.com>                                |
00017    +----------------------------------------------------------------------+
00018  */
00019 
00020 /* $Id: basic_functions.c 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #include "php.h"
00023 #include "php_streams.h"
00024 #include "php_main.h"
00025 #include "php_globals.h"
00026 #include "php_ini.h"
00027 #include "php_standard.h"
00028 #include "php_math.h"
00029 #include "php_http.h"
00030 #include "php_incomplete_class.h"
00031 #include "php_getopt.h"
00032 #include "ext/standard/info.h"
00033 #include "ext/session/php_session.h"
00034 #include "zend_operators.h"
00035 #include "ext/standard/php_dns.h"
00036 #include "ext/standard/php_uuencode.h"
00037 #include "safe_mode.h"
00038 
00039 #ifdef PHP_WIN32
00040 #include "win32/php_win32_globals.h"
00041 #include "win32/time.h"
00042 #endif
00043 
00044 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00045 
00046 #include "zend.h"
00047 #include "zend_ini_scanner.h"
00048 #include "zend_language_scanner.h"
00049 #include <zend_language_parser.h>
00050 
00051 #include <stdarg.h>
00052 #include <stdlib.h>
00053 #include <math.h>
00054 #include <time.h>
00055 #include <stdio.h>
00056 
00057 #ifndef PHP_WIN32
00058 #include <sys/types.h>
00059 #include <sys/stat.h>
00060 #endif
00061 
00062 #ifdef NETWARE
00063 #include <netinet/in.h>
00064 #endif
00065 
00066 #ifndef PHP_WIN32
00067 # include <netdb.h>
00068 #else
00069 #include "win32/inet.h"
00070 #endif
00071 
00072 #if HAVE_ARPA_INET_H
00073 # include <arpa/inet.h>
00074 #endif
00075 
00076 #if HAVE_UNISTD_H
00077 # include <unistd.h>
00078 #endif
00079 
00080 #if HAVE_STRING_H
00081 # include <string.h>
00082 #else
00083 # include <strings.h>
00084 #endif
00085 
00086 #if HAVE_LOCALE_H
00087 # include <locale.h>
00088 #endif
00089 
00090 #if HAVE_SYS_MMAN_H
00091 # include <sys/mman.h>
00092 #endif
00093 
00094 #if HAVE_SYS_LOADAVG_H
00095 # include <sys/loadavg.h>
00096 #endif
00097 
00098 #ifdef PHP_WIN32
00099 # include "win32/unistd.h"
00100 #endif
00101 
00102 #ifndef INADDR_NONE
00103 #define INADDR_NONE ((unsigned long int) -1)
00104 #endif
00105 
00106 #include "zend_globals.h"
00107 #include "php_globals.h"
00108 #include "SAPI.h"
00109 #include "php_ticks.h"
00110 
00111 #ifdef ZTS
00112 PHPAPI int basic_globals_id;
00113 #else
00114 PHPAPI php_basic_globals basic_globals;
00115 #endif
00116 
00117 #include "php_fopen_wrappers.h"
00118 #include "streamsfuncs.h"
00119 
00120 static zend_class_entry *incomplete_class_entry = NULL;
00121 
00122 typedef struct _php_shutdown_function_entry {
00123        zval **arguments;
00124        int arg_count;
00125 } php_shutdown_function_entry;
00126 
00127 typedef struct _user_tick_function_entry {
00128        zval **arguments;
00129        int arg_count;
00130        int calling;
00131 } user_tick_function_entry;
00132 
00133 /* some prototypes for local functions */
00134 static void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
00135 static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry);
00136 
00137 #undef sprintf
00138 
00139 /* {{{ arginfo */
00140 /* {{{ main/main.c */
00141 ZEND_BEGIN_ARG_INFO(arginfo_set_time_limit, 0)
00142        ZEND_ARG_INFO(0, seconds)
00143 ZEND_END_ARG_INFO()
00144 /* }}} */
00145 /* {{{ main/output.c */
00146 ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_start, 0, 0, 0)
00147        ZEND_ARG_INFO(0, user_function)
00148        ZEND_ARG_INFO(0, chunk_size)
00149        ZEND_ARG_INFO(0, flags)
00150 ZEND_END_ARG_INFO()
00151 
00152 ZEND_BEGIN_ARG_INFO(arginfo_ob_flush, 0)
00153 ZEND_END_ARG_INFO()
00154 
00155 ZEND_BEGIN_ARG_INFO(arginfo_ob_clean, 0)
00156 ZEND_END_ARG_INFO()
00157 
00158 ZEND_BEGIN_ARG_INFO(arginfo_ob_end_flush, 0)
00159 ZEND_END_ARG_INFO()
00160 
00161 ZEND_BEGIN_ARG_INFO(arginfo_ob_end_clean, 0)
00162 ZEND_END_ARG_INFO()
00163 
00164 ZEND_BEGIN_ARG_INFO(arginfo_ob_get_flush, 0)
00165 ZEND_END_ARG_INFO()
00166 
00167 ZEND_BEGIN_ARG_INFO(arginfo_ob_get_clean, 0)
00168 ZEND_END_ARG_INFO()
00169 
00170 ZEND_BEGIN_ARG_INFO(arginfo_ob_get_contents, 0)
00171 ZEND_END_ARG_INFO()
00172 
00173 ZEND_BEGIN_ARG_INFO(arginfo_ob_get_level, 0)
00174 ZEND_END_ARG_INFO()
00175 
00176 ZEND_BEGIN_ARG_INFO(arginfo_ob_get_length, 0)
00177 ZEND_END_ARG_INFO()
00178 
00179 ZEND_BEGIN_ARG_INFO(arginfo_ob_list_handlers, 0)
00180 ZEND_END_ARG_INFO()
00181 
00182 ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_get_status, 0, 0, 0)
00183        ZEND_ARG_INFO(0, full_status)
00184 ZEND_END_ARG_INFO()
00185 
00186 ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_implicit_flush, 0, 0, 0)
00187        ZEND_ARG_INFO(0, flag)
00188 ZEND_END_ARG_INFO()
00189 
00190 ZEND_BEGIN_ARG_INFO(arginfo_output_reset_rewrite_vars, 0)
00191 ZEND_END_ARG_INFO()
00192 
00193 ZEND_BEGIN_ARG_INFO(arginfo_output_add_rewrite_var, 0)
00194        ZEND_ARG_INFO(0, name)
00195        ZEND_ARG_INFO(0, value)
00196 ZEND_END_ARG_INFO()
00197 /* }}} */
00198 /* {{{ main/streams/userspace.c */
00199 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_wrapper_register, 0, 0, 2)
00200        ZEND_ARG_INFO(0, protocol)
00201        ZEND_ARG_INFO(0, classname)
00202        ZEND_ARG_INFO(0, flags)
00203 ZEND_END_ARG_INFO()
00204 
00205 ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_unregister, 0)
00206        ZEND_ARG_INFO(0, protocol)
00207 ZEND_END_ARG_INFO()
00208 
00209 ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_restore, 0)
00210        ZEND_ARG_INFO(0, protocol)
00211 ZEND_END_ARG_INFO()
00212 /* }}} */
00213 /* {{{ array.c */
00214 ZEND_BEGIN_ARG_INFO_EX(arginfo_krsort, 0, 0, 1)
00215        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00216        ZEND_ARG_INFO(0, sort_flags)
00217 ZEND_END_ARG_INFO()
00218 
00219 ZEND_BEGIN_ARG_INFO_EX(arginfo_ksort, 0, 0, 1)
00220        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00221        ZEND_ARG_INFO(0, sort_flags)
00222 ZEND_END_ARG_INFO()
00223 
00224 ZEND_BEGIN_ARG_INFO_EX(arginfo_count, 0, 0, 1)
00225        ZEND_ARG_INFO(0, var)
00226        ZEND_ARG_INFO(0, mode)
00227 ZEND_END_ARG_INFO()
00228 
00229 ZEND_BEGIN_ARG_INFO(arginfo_natsort, 0)
00230        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00231 ZEND_END_ARG_INFO()
00232 
00233 ZEND_BEGIN_ARG_INFO(arginfo_natcasesort, 0)
00234        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00235 ZEND_END_ARG_INFO()
00236 
00237 ZEND_BEGIN_ARG_INFO_EX(arginfo_asort, 0, 0, 1)
00238        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00239        ZEND_ARG_INFO(0, sort_flags)
00240 ZEND_END_ARG_INFO()
00241 
00242 ZEND_BEGIN_ARG_INFO_EX(arginfo_arsort, 0, 0, 1)
00243        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00244        ZEND_ARG_INFO(0, sort_flags)
00245 ZEND_END_ARG_INFO()
00246 
00247 ZEND_BEGIN_ARG_INFO_EX(arginfo_sort, 0, 0, 1)
00248        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00249        ZEND_ARG_INFO(0, sort_flags)
00250 ZEND_END_ARG_INFO()
00251 
00252 ZEND_BEGIN_ARG_INFO_EX(arginfo_rsort, 0, 0, 1)
00253        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00254        ZEND_ARG_INFO(0, sort_flags)
00255 ZEND_END_ARG_INFO()
00256 
00257 ZEND_BEGIN_ARG_INFO(arginfo_usort, 0)
00258        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00259        ZEND_ARG_INFO(0, cmp_function)
00260 ZEND_END_ARG_INFO()
00261 
00262 ZEND_BEGIN_ARG_INFO(arginfo_uasort, 0)
00263        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00264        ZEND_ARG_INFO(0, cmp_function)
00265 ZEND_END_ARG_INFO()
00266 
00267 ZEND_BEGIN_ARG_INFO(arginfo_uksort, 0)
00268        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00269        ZEND_ARG_INFO(0, cmp_function)
00270 ZEND_END_ARG_INFO()
00271 
00272 ZEND_BEGIN_ARG_INFO(arginfo_end, 0)
00273        ZEND_ARG_INFO(1, arg)
00274 ZEND_END_ARG_INFO()
00275 
00276 ZEND_BEGIN_ARG_INFO(arginfo_prev, 0)
00277        ZEND_ARG_INFO(1, arg)
00278 ZEND_END_ARG_INFO()
00279 
00280 ZEND_BEGIN_ARG_INFO(arginfo_next, 0)
00281        ZEND_ARG_INFO(1, arg)
00282 ZEND_END_ARG_INFO()
00283 
00284 ZEND_BEGIN_ARG_INFO(arginfo_reset, 0)
00285        ZEND_ARG_INFO(1, arg)
00286 ZEND_END_ARG_INFO()
00287 
00288 ZEND_BEGIN_ARG_INFO(arginfo_current, ZEND_SEND_PREFER_REF)
00289        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
00290 ZEND_END_ARG_INFO()
00291 
00292 ZEND_BEGIN_ARG_INFO(arginfo_key, ZEND_SEND_PREFER_REF)
00293        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
00294 ZEND_END_ARG_INFO()
00295 
00296 ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1)
00297        ZEND_ARG_INFO(0, arg1)
00298        ZEND_ARG_INFO(0, arg2)
00299        ZEND_ARG_INFO(0, ...)
00300 ZEND_END_ARG_INFO()
00301 
00302 ZEND_BEGIN_ARG_INFO_EX(arginfo_max, 0, 0, 1)
00303        ZEND_ARG_INFO(0, arg1)
00304        ZEND_ARG_INFO(0, arg2)
00305        ZEND_ARG_INFO(0, ...)
00306 ZEND_END_ARG_INFO()
00307 
00308 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk, 0, 0, 2)
00309        ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */
00310        ZEND_ARG_INFO(0, funcname)
00311        ZEND_ARG_INFO(0, userdata)
00312 ZEND_END_ARG_INFO()
00313 
00314 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk_recursive, 0, 0, 2)
00315        ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */
00316        ZEND_ARG_INFO(0, funcname)
00317        ZEND_ARG_INFO(0, userdata)
00318 ZEND_END_ARG_INFO()
00319 
00320 ZEND_BEGIN_ARG_INFO_EX(arginfo_in_array, 0, 0, 2)
00321        ZEND_ARG_INFO(0, needle)
00322        ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */
00323        ZEND_ARG_INFO(0, strict)
00324 ZEND_END_ARG_INFO()
00325 
00326 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_search, 0, 0, 2)
00327        ZEND_ARG_INFO(0, needle)
00328        ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */
00329        ZEND_ARG_INFO(0, strict)
00330 ZEND_END_ARG_INFO()
00331 
00332 ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1)
00333        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */
00334        ZEND_ARG_INFO(0, extract_type)
00335        ZEND_ARG_INFO(0, prefix)
00336 ZEND_END_ARG_INFO()
00337 
00338 ZEND_BEGIN_ARG_INFO_EX(arginfo_compact, 0, 0, 1)
00339        ZEND_ARG_INFO(0, var_names)
00340        ZEND_ARG_INFO(0, ...)
00341 ZEND_END_ARG_INFO()
00342 
00343 ZEND_BEGIN_ARG_INFO(arginfo_array_fill, 0)
00344        ZEND_ARG_INFO(0, start_key)
00345        ZEND_ARG_INFO(0, num)
00346        ZEND_ARG_INFO(0, val)
00347 ZEND_END_ARG_INFO()
00348 
00349 ZEND_BEGIN_ARG_INFO(arginfo_array_fill_keys, 0)
00350        ZEND_ARG_INFO(0, keys) /* ARRAY_INFO(0, keys, 0) */
00351        ZEND_ARG_INFO(0, val)
00352 ZEND_END_ARG_INFO()
00353 
00354 ZEND_BEGIN_ARG_INFO_EX(arginfo_range, 0, 0, 2)
00355        ZEND_ARG_INFO(0, low)
00356        ZEND_ARG_INFO(0, high)
00357        ZEND_ARG_INFO(0, step)
00358 ZEND_END_ARG_INFO()
00359 
00360 ZEND_BEGIN_ARG_INFO(arginfo_shuffle, 0)
00361        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00362 ZEND_END_ARG_INFO()
00363 
00364 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_push, 0, 0, 2)
00365        ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
00366        ZEND_ARG_INFO(0, var)
00367        ZEND_ARG_INFO(0, ...)
00368 ZEND_END_ARG_INFO()
00369 
00370 ZEND_BEGIN_ARG_INFO(arginfo_array_pop, 0)
00371        ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
00372 ZEND_END_ARG_INFO()
00373 
00374 ZEND_BEGIN_ARG_INFO(arginfo_array_shift, 0)
00375        ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
00376 ZEND_END_ARG_INFO()
00377 
00378 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unshift, 0, 0, 2)
00379        ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
00380        ZEND_ARG_INFO(0, var)
00381        ZEND_ARG_INFO(0, ...)
00382 ZEND_END_ARG_INFO()
00383 
00384 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_splice, 0, 0, 2)
00385        ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
00386        ZEND_ARG_INFO(0, offset)
00387        ZEND_ARG_INFO(0, length)
00388        ZEND_ARG_INFO(0, replacement) /* ARRAY_INFO(0, arg, 1) */
00389 ZEND_END_ARG_INFO()
00390 
00391 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_slice, 0, 0, 2)
00392        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(1, arg, 0) */
00393        ZEND_ARG_INFO(0, offset)
00394        ZEND_ARG_INFO(0, length)
00395        ZEND_ARG_INFO(0, preserve_keys)
00396 ZEND_END_ARG_INFO()
00397 
00398 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge, 0, 0, 2)
00399        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
00400        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg, 0) */
00401        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00402 ZEND_END_ARG_INFO()
00403 
00404 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge_recursive, 0, 0, 2)
00405        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
00406        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg, 0) */
00407        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, arg, 0) */
00408 ZEND_END_ARG_INFO()
00409 
00410 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace, 0, 0, 2)
00411        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
00412        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg, 0) */
00413        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00414 ZEND_END_ARG_INFO()
00415 
00416 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace_recursive, 0, 0, 2)
00417        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
00418        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg, 0) */
00419        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, arg, 0) */
00420 ZEND_END_ARG_INFO()
00421 
00422 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_keys, 0, 0, 1)
00423        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00424        ZEND_ARG_INFO(0, search_value)
00425        ZEND_ARG_INFO(0, strict)
00426 ZEND_END_ARG_INFO()
00427 
00428 ZEND_BEGIN_ARG_INFO(arginfo_array_values, 0)
00429        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00430 ZEND_END_ARG_INFO()
00431 
00432 ZEND_BEGIN_ARG_INFO(arginfo_array_count_values, 0)
00433        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00434 ZEND_END_ARG_INFO()
00435 
00436 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reverse, 0, 0, 1)
00437        ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */
00438        ZEND_ARG_INFO(0, preserve_keys)
00439 ZEND_END_ARG_INFO()
00440 
00441 ZEND_BEGIN_ARG_INFO(arginfo_array_pad, 0)
00442        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00443        ZEND_ARG_INFO(0, pad_size)
00444        ZEND_ARG_INFO(0, pad_value)
00445 ZEND_END_ARG_INFO()
00446 
00447 ZEND_BEGIN_ARG_INFO(arginfo_array_flip, 0)
00448        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00449 ZEND_END_ARG_INFO()
00450 
00451 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_change_key_case, 0, 0, 1)
00452        ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */
00453        ZEND_ARG_INFO(0, case)
00454 ZEND_END_ARG_INFO()
00455 
00456 ZEND_BEGIN_ARG_INFO(arginfo_array_unique, 0)
00457        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00458 ZEND_END_ARG_INFO()
00459 
00460 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_key, 0, 0, 2)
00461        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00462        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00463        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00464 ZEND_END_ARG_INFO()
00465 
00466 ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_ukey, 0)
00467        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00468        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00469        ZEND_ARG_INFO(0, callback_key_compare_func)
00470 ZEND_END_ARG_INFO()
00471 
00472 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect, 0, 0, 2)
00473        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00474        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00475        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00476 ZEND_END_ARG_INFO()
00477 
00478 ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect, 0)
00479        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00480        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00481        ZEND_ARG_INFO(0, callback_data_compare_func)
00482 ZEND_END_ARG_INFO()
00483 
00484 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_assoc, 0, 0, 2)
00485        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00486        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00487        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00488 ZEND_END_ARG_INFO()
00489 
00490 ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_assoc, 0)
00491        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00492        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00493        ZEND_ARG_INFO(0, callback_data_compare_func)
00494 ZEND_END_ARG_INFO()
00495 
00496 ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_uassoc, 0)
00497        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00498        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00499        ZEND_ARG_INFO(0, callback_key_compare_func)
00500 ZEND_END_ARG_INFO()
00501 
00502 ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_uassoc, 0)
00503        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00504        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00505        ZEND_ARG_INFO(0, callback_data_compare_func)
00506        ZEND_ARG_INFO(0, callback_key_compare_func)
00507 ZEND_END_ARG_INFO()
00508 
00509 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_key, 0, 0, 2)
00510        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00511        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00512        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00513 ZEND_END_ARG_INFO()
00514 
00515 ZEND_BEGIN_ARG_INFO(arginfo_array_diff_ukey, 0)
00516        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00517        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00518        ZEND_ARG_INFO(0, callback_key_comp_func)
00519 ZEND_END_ARG_INFO()
00520 
00521 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff, 0, 0, 2)
00522        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00523        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00524        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00525 ZEND_END_ARG_INFO()
00526 
00527 ZEND_BEGIN_ARG_INFO(arginfo_array_udiff, 0)
00528        ZEND_ARG_INFO(0, arr1)
00529        ZEND_ARG_INFO(0, arr2)
00530        ZEND_ARG_INFO(0, callback_data_comp_func)
00531 ZEND_END_ARG_INFO()
00532 
00533 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_assoc, 0, 0, 2)
00534        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00535        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00536        ZEND_ARG_INFO(0, ...)  /* ARRAY_INFO(0, ..., 0) */
00537 ZEND_END_ARG_INFO()
00538 
00539 ZEND_BEGIN_ARG_INFO(arginfo_array_diff_uassoc, 0)
00540        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00541        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00542        ZEND_ARG_INFO(0, callback_data_comp_func)
00543 ZEND_END_ARG_INFO()
00544 
00545 ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_assoc, 0)
00546        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00547        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00548        ZEND_ARG_INFO(0, callback_key_comp_func)
00549 ZEND_END_ARG_INFO()
00550 
00551 ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_uassoc, 0)
00552        ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
00553        ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
00554        ZEND_ARG_INFO(0, callback_data_comp_func)
00555        ZEND_ARG_INFO(0, callback_key_comp_func)
00556 ZEND_END_ARG_INFO()
00557 
00558 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, ZEND_SEND_PREFER_REF, 0, 1)
00559        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */
00560        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
00561        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
00562        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr2)
00563        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
00564        ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
00565 ZEND_END_ARG_INFO()
00566 
00567 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
00568        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00569        ZEND_ARG_INFO(0, num_req)
00570 ZEND_END_ARG_INFO()
00571 
00572 ZEND_BEGIN_ARG_INFO(arginfo_array_sum, 0)
00573        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00574 ZEND_END_ARG_INFO()
00575 
00576 ZEND_BEGIN_ARG_INFO(arginfo_array_product, 0)
00577        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00578 ZEND_END_ARG_INFO()
00579 
00580 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reduce, 0, 0, 2)
00581        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00582        ZEND_ARG_INFO(0, callback)
00583        ZEND_ARG_INFO(0, initial)
00584 ZEND_END_ARG_INFO()
00585 
00586 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_filter, 0, 0, 1)
00587        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00588        ZEND_ARG_INFO(0, callback)
00589 ZEND_END_ARG_INFO()
00590 
00591 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_map, 0, 0, 2)
00592        ZEND_ARG_INFO(0, callback)
00593        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00594        ZEND_ARG_INFO(0, ...)
00595 ZEND_END_ARG_INFO()
00596 
00597 ZEND_BEGIN_ARG_INFO(arginfo_array_key_exists, 0)
00598        ZEND_ARG_INFO(0, key)
00599        ZEND_ARG_INFO(0, search)
00600 ZEND_END_ARG_INFO()
00601 
00602 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_chunk, 0, 0, 2)
00603        ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
00604        ZEND_ARG_INFO(0, size)
00605        ZEND_ARG_INFO(0, preserve_keys)
00606 ZEND_END_ARG_INFO()
00607 
00608 ZEND_BEGIN_ARG_INFO(arginfo_array_combine, 0)
00609        ZEND_ARG_INFO(0, keys)   /* ARRAY_INFO(0, keys, 0) */
00610        ZEND_ARG_INFO(0, values) /* ARRAY_INFO(0, values, 0) */
00611 ZEND_END_ARG_INFO()
00612 /* }}} */
00613 /* {{{ basic_functions.c */
00614 ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_gpc, 0)
00615 ZEND_END_ARG_INFO()
00616 
00617 ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_runtime, 0)
00618 ZEND_END_ARG_INFO()
00619 
00620 ZEND_BEGIN_ARG_INFO_EX(arginfo_set_magic_quotes_runtime, 0, 0, 1)
00621        ZEND_ARG_INFO(0, new_setting)
00622 ZEND_END_ARG_INFO()
00623 
00624 ZEND_BEGIN_ARG_INFO(arginfo_constant, 0)
00625        ZEND_ARG_INFO(0, const_name)
00626 ZEND_END_ARG_INFO()
00627 
00628 #ifdef HAVE_INET_NTOP
00629 ZEND_BEGIN_ARG_INFO(arginfo_inet_ntop, 0)
00630        ZEND_ARG_INFO(0, in_addr)
00631 ZEND_END_ARG_INFO()
00632 #endif
00633 
00634 #ifdef HAVE_INET_PTON
00635 ZEND_BEGIN_ARG_INFO(arginfo_inet_pton, 0)
00636        ZEND_ARG_INFO(0, ip_address)
00637 ZEND_END_ARG_INFO()
00638 #endif
00639 
00640 ZEND_BEGIN_ARG_INFO(arginfo_ip2long, 0)
00641        ZEND_ARG_INFO(0, ip_address)
00642 ZEND_END_ARG_INFO()
00643 
00644 ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0)
00645        ZEND_ARG_INFO(0, proper_address)
00646 ZEND_END_ARG_INFO()
00647 
00648 ZEND_BEGIN_ARG_INFO(arginfo_getenv, 0)
00649        ZEND_ARG_INFO(0, varname)
00650 ZEND_END_ARG_INFO()
00651 
00652 #ifdef HAVE_PUTENV
00653 ZEND_BEGIN_ARG_INFO(arginfo_putenv, 0)
00654        ZEND_ARG_INFO(0, setting)
00655 ZEND_END_ARG_INFO()
00656 #endif
00657 
00658 ZEND_BEGIN_ARG_INFO_EX(arginfo_getopt, 0, 0, 1)
00659        ZEND_ARG_INFO(0, options)
00660        ZEND_ARG_INFO(0, opts) /* ARRAY_INFO(0, opts, 1) */
00661 ZEND_END_ARG_INFO()
00662 
00663 ZEND_BEGIN_ARG_INFO(arginfo_flush, 0)
00664 ZEND_END_ARG_INFO()
00665 
00666 ZEND_BEGIN_ARG_INFO(arginfo_sleep, 0)
00667        ZEND_ARG_INFO(0, seconds)
00668 ZEND_END_ARG_INFO()
00669 
00670 ZEND_BEGIN_ARG_INFO(arginfo_usleep, 0)
00671        ZEND_ARG_INFO(0, micro_seconds)
00672 ZEND_END_ARG_INFO()
00673 
00674 #if HAVE_NANOSLEEP
00675 ZEND_BEGIN_ARG_INFO(arginfo_time_nanosleep, 0)
00676        ZEND_ARG_INFO(0, seconds)
00677        ZEND_ARG_INFO(0, nanoseconds)
00678 ZEND_END_ARG_INFO()
00679 
00680 ZEND_BEGIN_ARG_INFO(arginfo_time_sleep_until, 0)
00681        ZEND_ARG_INFO(0, timestamp)
00682 ZEND_END_ARG_INFO()
00683 #endif
00684 
00685 ZEND_BEGIN_ARG_INFO(arginfo_get_current_user, 0)
00686 ZEND_END_ARG_INFO()
00687 
00688 ZEND_BEGIN_ARG_INFO(arginfo_get_cfg_var, 0)
00689        ZEND_ARG_INFO(0, option_name)
00690 ZEND_END_ARG_INFO()
00691 
00692 ZEND_BEGIN_ARG_INFO_EX(arginfo_error_log, 0, 0, 1)
00693        ZEND_ARG_INFO(0, message)
00694        ZEND_ARG_INFO(0, message_type)
00695        ZEND_ARG_INFO(0, destination)
00696        ZEND_ARG_INFO(0, extra_headers)
00697 ZEND_END_ARG_INFO()
00698 
00699 ZEND_BEGIN_ARG_INFO_EX(arginfo_error_get_last, 0, 0, 0)
00700 ZEND_END_ARG_INFO()
00701 
00702 ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func, 0, 0, 1)
00703        ZEND_ARG_INFO(0, function_name)
00704        ZEND_ARG_INFO(0, parmeter)
00705        ZEND_ARG_INFO(0, ...)
00706 ZEND_END_ARG_INFO()
00707 
00708 ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func_array, 0, 0, 2)
00709        ZEND_ARG_INFO(0, function_name)
00710        ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */
00711 ZEND_END_ARG_INFO()
00712 
00713 ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_method, 0, 0, 2)
00714        ZEND_ARG_INFO(0, method_name)
00715        ZEND_ARG_INFO(1, object)
00716        ZEND_ARG_INFO(0, parameter)
00717        ZEND_ARG_INFO(0, ...)
00718 ZEND_END_ARG_INFO()
00719 
00720 ZEND_BEGIN_ARG_INFO(arginfo_call_user_method_array, 0)
00721        ZEND_ARG_INFO(0, method_name)
00722        ZEND_ARG_INFO(1, object)
00723        ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */
00724 ZEND_END_ARG_INFO()
00725 
00726 ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call, 0, 0, 1)
00727        ZEND_ARG_INFO(0, function_name)
00728        ZEND_ARG_INFO(0, parameter)
00729        ZEND_ARG_INFO(0, ...)
00730 ZEND_END_ARG_INFO()
00731 
00732 ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call_array, 0, 0, 2)
00733        ZEND_ARG_INFO(0, function_name)
00734        ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */
00735 ZEND_END_ARG_INFO()
00736 
00737 ZEND_BEGIN_ARG_INFO(arginfo_register_shutdown_function, 0)
00738        ZEND_ARG_INFO(0, function_name)
00739 ZEND_END_ARG_INFO()
00740 
00741 ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_file, 0, 0, 1)
00742        ZEND_ARG_INFO(0, file_name)
00743        ZEND_ARG_INFO(0, return)
00744 ZEND_END_ARG_INFO()
00745 
00746 ZEND_BEGIN_ARG_INFO(arginfo_php_strip_whitespace, 0)
00747        ZEND_ARG_INFO(0, file_name)
00748 ZEND_END_ARG_INFO()
00749 
00750 ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_string, 0, 0, 1)
00751        ZEND_ARG_INFO(0, string)
00752        ZEND_ARG_INFO(0, return)
00753 ZEND_END_ARG_INFO()
00754 
00755 ZEND_BEGIN_ARG_INFO(arginfo_ini_get, 0)
00756        ZEND_ARG_INFO(0, varname)
00757 ZEND_END_ARG_INFO()
00758 
00759 ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_get_all, 0, 0, 0)
00760        ZEND_ARG_INFO(0, extension)
00761 ZEND_END_ARG_INFO()
00762 
00763 ZEND_BEGIN_ARG_INFO(arginfo_ini_set, 0)
00764        ZEND_ARG_INFO(0, varname)
00765        ZEND_ARG_INFO(0, newvalue)
00766 ZEND_END_ARG_INFO()
00767 
00768 ZEND_BEGIN_ARG_INFO(arginfo_ini_restore, 0)
00769        ZEND_ARG_INFO(0, varname)
00770 ZEND_END_ARG_INFO()
00771 
00772 ZEND_BEGIN_ARG_INFO(arginfo_set_include_path, 0)
00773        ZEND_ARG_INFO(0, new_include_path)
00774 ZEND_END_ARG_INFO()
00775 
00776 ZEND_BEGIN_ARG_INFO(arginfo_get_include_path, 0)
00777 ZEND_END_ARG_INFO()
00778 
00779 ZEND_BEGIN_ARG_INFO(arginfo_restore_include_path, 0)
00780 ZEND_END_ARG_INFO()
00781 
00782 ZEND_BEGIN_ARG_INFO_EX(arginfo_print_r, 0, 0, 1)
00783        ZEND_ARG_INFO(0, var)
00784        ZEND_ARG_INFO(0, return)
00785 ZEND_END_ARG_INFO()
00786 
00787 ZEND_BEGIN_ARG_INFO(arginfo_connection_aborted, 0)
00788 ZEND_END_ARG_INFO()
00789 
00790 ZEND_BEGIN_ARG_INFO(arginfo_connection_status, 0)
00791 ZEND_END_ARG_INFO()
00792 
00793 ZEND_BEGIN_ARG_INFO_EX(arginfo_ignore_user_abort, 0, 0, 0)
00794        ZEND_ARG_INFO(0, value)
00795 ZEND_END_ARG_INFO()
00796 
00797 #if HAVE_GETSERVBYNAME
00798 ZEND_BEGIN_ARG_INFO(arginfo_getservbyname, 0)
00799        ZEND_ARG_INFO(0, service)
00800        ZEND_ARG_INFO(0, protocol)
00801 ZEND_END_ARG_INFO()
00802 #endif
00803 
00804 #if HAVE_GETSERVBYPORT
00805 ZEND_BEGIN_ARG_INFO(arginfo_getservbyport, 0)
00806        ZEND_ARG_INFO(0, port)
00807        ZEND_ARG_INFO(0, protocol)
00808 ZEND_END_ARG_INFO()
00809 #endif
00810 
00811 #if HAVE_GETPROTOBYNAME
00812 ZEND_BEGIN_ARG_INFO(arginfo_getprotobyname, 0)
00813        ZEND_ARG_INFO(0, name)
00814 ZEND_END_ARG_INFO()
00815 #endif
00816 
00817 #if HAVE_GETPROTOBYNUMBER
00818 ZEND_BEGIN_ARG_INFO(arginfo_getprotobynumber, 0)
00819        ZEND_ARG_INFO(0, proto)
00820 ZEND_END_ARG_INFO()
00821 #endif
00822 
00823 ZEND_BEGIN_ARG_INFO_EX(arginfo_register_tick_function, 0, 0, 1)
00824        ZEND_ARG_INFO(0, function_name)
00825        ZEND_ARG_INFO(0, arg)
00826        ZEND_ARG_INFO(0, ...)
00827 ZEND_END_ARG_INFO()
00828 
00829 ZEND_BEGIN_ARG_INFO(arginfo_unregister_tick_function, 0)
00830        ZEND_ARG_INFO(0, function_name)
00831 ZEND_END_ARG_INFO()
00832 
00833 ZEND_BEGIN_ARG_INFO(arginfo_is_uploaded_file, 0)
00834        ZEND_ARG_INFO(0, path)
00835 ZEND_END_ARG_INFO()
00836 
00837 ZEND_BEGIN_ARG_INFO(arginfo_move_uploaded_file, 0)
00838        ZEND_ARG_INFO(0, path)
00839        ZEND_ARG_INFO(0, new_path)
00840 ZEND_END_ARG_INFO()
00841 
00842 ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
00843        ZEND_ARG_INFO(0, filename)
00844        ZEND_ARG_INFO(0, process_sections)
00845        ZEND_ARG_INFO(0, scanner_mode)
00846 ZEND_END_ARG_INFO()
00847 
00848 ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_string, 0, 0, 1)
00849     ZEND_ARG_INFO(0, ini_string)
00850     ZEND_ARG_INFO(0, process_sections)
00851     ZEND_ARG_INFO(0, scanner_mode)
00852 ZEND_END_ARG_INFO()
00853 
00854 #if ZEND_DEBUG
00855 ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
00856 ZEND_END_ARG_INFO()
00857 #endif
00858  
00859 ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
00860        ZEND_ARG_INFO(0, types)
00861        ZEND_ARG_INFO(0, prefix)
00862 ZEND_END_ARG_INFO()
00863 
00864 #ifdef HAVE_GETLOADAVG
00865 ZEND_BEGIN_ARG_INFO(arginfo_sys_getloadavg, 0)
00866 ZEND_END_ARG_INFO()
00867 #endif
00868 /* }}} */
00869 /* {{{ assert.c */
00870 ZEND_BEGIN_ARG_INFO(arginfo_assert, 0)
00871        ZEND_ARG_INFO(0, assertion)
00872 ZEND_END_ARG_INFO()
00873 
00874 ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1)
00875        ZEND_ARG_INFO(0, what)
00876        ZEND_ARG_INFO(0, value)
00877 ZEND_END_ARG_INFO()
00878 /* }}} */
00879 /* {{{ base64.c */
00880 ZEND_BEGIN_ARG_INFO(arginfo_base64_encode, 0)
00881        ZEND_ARG_INFO(0, str)
00882 ZEND_END_ARG_INFO()
00883 
00884 ZEND_BEGIN_ARG_INFO_EX(arginfo_base64_decode, 0, 0, 1)
00885        ZEND_ARG_INFO(0, str)
00886        ZEND_ARG_INFO(0, strict)
00887 ZEND_END_ARG_INFO()
00888 
00889 /* }}} */
00890 /* {{{ browscap.c */
00891 ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0)
00892        ZEND_ARG_INFO(0, browser_name)
00893        ZEND_ARG_INFO(0, return_array)
00894 ZEND_END_ARG_INFO()
00895 /* }}} */
00896 /* {{{ crc32.c */
00897 ZEND_BEGIN_ARG_INFO(arginfo_crc32, 0)
00898        ZEND_ARG_INFO(0, str)
00899 ZEND_END_ARG_INFO()
00900 
00901 /* }}} */
00902 /* {{{ crypt.c */
00903 #if HAVE_CRYPT
00904 ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1)
00905        ZEND_ARG_INFO(0, str)
00906        ZEND_ARG_INFO(0, salt)
00907 ZEND_END_ARG_INFO()
00908 #endif
00909 /* }}} */
00910 /* {{{ cyr_convert.c */
00911 ZEND_BEGIN_ARG_INFO(arginfo_convert_cyr_string, 0)
00912        ZEND_ARG_INFO(0, str)
00913        ZEND_ARG_INFO(0, from)
00914        ZEND_ARG_INFO(0, to)
00915 ZEND_END_ARG_INFO()
00916 
00917 /* }}} */
00918 /* {{{ datetime.c */
00919 #if HAVE_STRPTIME
00920 ZEND_BEGIN_ARG_INFO(arginfo_strptime, 0)
00921        ZEND_ARG_INFO(0, timestamp)
00922        ZEND_ARG_INFO(0, format)
00923 ZEND_END_ARG_INFO()
00924 #endif
00925 /* }}} */
00926 /* {{{ dir.c */
00927 ZEND_BEGIN_ARG_INFO_EX(arginfo_opendir, 0, 0, 1)
00928        ZEND_ARG_INFO(0, path)
00929        ZEND_ARG_INFO(0, context)
00930 ZEND_END_ARG_INFO()
00931 
00932 ZEND_BEGIN_ARG_INFO_EX(arginfo_dir, 0, 0, 1)
00933        ZEND_ARG_INFO(0, directory)
00934        ZEND_ARG_INFO(0, context)
00935 ZEND_END_ARG_INFO()
00936 
00937 ZEND_BEGIN_ARG_INFO_EX(arginfo_closedir, 0, 0, 0)
00938        ZEND_ARG_INFO(0, dir_handle)
00939 ZEND_END_ARG_INFO()
00940 
00941 #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
00942 ZEND_BEGIN_ARG_INFO(arginfo_chroot, 0)
00943        ZEND_ARG_INFO(0, directory)
00944 ZEND_END_ARG_INFO()
00945 #endif
00946 
00947 ZEND_BEGIN_ARG_INFO(arginfo_chdir, 0)
00948        ZEND_ARG_INFO(0, directory)
00949 ZEND_END_ARG_INFO()
00950 
00951 ZEND_BEGIN_ARG_INFO(arginfo_getcwd, 0)
00952 ZEND_END_ARG_INFO()
00953 
00954 ZEND_BEGIN_ARG_INFO_EX(arginfo_rewinddir, 0, 0, 0)
00955        ZEND_ARG_INFO(0, dir_handle)
00956 ZEND_END_ARG_INFO()
00957 
00958 ZEND_BEGIN_ARG_INFO_EX(arginfo_readdir, 0, 0, 0)
00959        ZEND_ARG_INFO(0, dir_handle)
00960 ZEND_END_ARG_INFO()
00961 
00962 #ifdef HAVE_GLOB
00963 ZEND_BEGIN_ARG_INFO_EX(arginfo_glob, 0, 0, 1)
00964        ZEND_ARG_INFO(0, pattern)
00965        ZEND_ARG_INFO(0, flags)
00966 ZEND_END_ARG_INFO()
00967 #endif
00968 
00969 ZEND_BEGIN_ARG_INFO_EX(arginfo_scandir, 0, 0, 1)
00970        ZEND_ARG_INFO(0, dir)
00971        ZEND_ARG_INFO(0, sorting_order)
00972        ZEND_ARG_INFO(0, context)
00973 ZEND_END_ARG_INFO()
00974 /* }}} */
00975 /* {{{ arginfo ext/standard/dl.c */
00976 ZEND_BEGIN_ARG_INFO(arginfo_dl, 0)
00977        ZEND_ARG_INFO(0, extension_filename)
00978 ZEND_END_ARG_INFO()
00979 /* }}} */
00980 /* {{{ dns.c */
00981 ZEND_BEGIN_ARG_INFO(arginfo_gethostbyaddr, 0)
00982        ZEND_ARG_INFO(0, ip_address)
00983 ZEND_END_ARG_INFO()
00984 
00985 ZEND_BEGIN_ARG_INFO(arginfo_gethostbyname, 0)
00986        ZEND_ARG_INFO(0, hostname)
00987 ZEND_END_ARG_INFO()
00988 
00989 ZEND_BEGIN_ARG_INFO(arginfo_gethostbynamel, 0)
00990        ZEND_ARG_INFO(0, hostname)
00991 ZEND_END_ARG_INFO()
00992 
00993 #ifdef HAVE_GETHOSTNAME
00994 ZEND_BEGIN_ARG_INFO(arginfo_gethostname, 0)
00995 ZEND_END_ARG_INFO()
00996 #endif
00997 
00998 #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
00999 ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_check_record, 0, 0, 1)
01000        ZEND_ARG_INFO(0, host)
01001        ZEND_ARG_INFO(0, type)
01002 ZEND_END_ARG_INFO()
01003 
01004 # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
01005 ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 1, 0, 1)
01006        ZEND_ARG_INFO(0, hostname)
01007        ZEND_ARG_INFO(0, type)
01008        ZEND_ARG_INFO(1, authns) /* ARRAY_INFO(1, authns, 1) */
01009        ZEND_ARG_INFO(1, addtl)  /* ARRAY_INFO(1, addtl, 1) */
01010 ZEND_END_ARG_INFO()
01011 
01012 ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_mx, 0, 0, 2)
01013        ZEND_ARG_INFO(0, hostname)
01014        ZEND_ARG_INFO(1, mxhosts) /* ARRAY_INFO(1, mxhosts, 1) */
01015        ZEND_ARG_INFO(1, weight) /* ARRAY_INFO(1, weight, 1) */
01016 ZEND_END_ARG_INFO()
01017 # endif
01018 
01019 #endif /* defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE))) */
01020 /* }}} */
01021 
01022 /* {{{ exec.c */
01023 ZEND_BEGIN_ARG_INFO_EX(arginfo_exec, 0, 0, 1)
01024        ZEND_ARG_INFO(0, command)
01025        ZEND_ARG_INFO(1, output) /* ARRAY_INFO(1, output, 1) */
01026        ZEND_ARG_INFO(1, return_value)
01027 ZEND_END_ARG_INFO()
01028 
01029 ZEND_BEGIN_ARG_INFO_EX(arginfo_system, 0, 0, 1)
01030        ZEND_ARG_INFO(0, command)
01031        ZEND_ARG_INFO(1, return_value)
01032 ZEND_END_ARG_INFO()
01033 
01034 ZEND_BEGIN_ARG_INFO_EX(arginfo_passthru, 0, 0, 1)
01035        ZEND_ARG_INFO(0, command)
01036        ZEND_ARG_INFO(1, return_value)
01037 ZEND_END_ARG_INFO()
01038 
01039 ZEND_BEGIN_ARG_INFO(arginfo_escapeshellcmd, 0)
01040        ZEND_ARG_INFO(0, command)
01041 ZEND_END_ARG_INFO()
01042 
01043 ZEND_BEGIN_ARG_INFO(arginfo_escapeshellarg, 0)
01044        ZEND_ARG_INFO(0, arg)
01045 ZEND_END_ARG_INFO()
01046 
01047 ZEND_BEGIN_ARG_INFO(arginfo_shell_exec, 0)
01048        ZEND_ARG_INFO(0, cmd)
01049 ZEND_END_ARG_INFO()
01050 
01051 #ifdef HAVE_NICE
01052 ZEND_BEGIN_ARG_INFO(arginfo_proc_nice, 0)
01053        ZEND_ARG_INFO(0, priority)
01054 ZEND_END_ARG_INFO()
01055 #endif
01056 /* }}} */
01057 /* {{{ file.c */
01058 ZEND_BEGIN_ARG_INFO_EX(arginfo_flock, 0, 0, 2)
01059        ZEND_ARG_INFO(0, fp)
01060        ZEND_ARG_INFO(0, operation)
01061        ZEND_ARG_INFO(1, wouldblock)
01062 ZEND_END_ARG_INFO()
01063 
01064 ZEND_BEGIN_ARG_INFO_EX(arginfo_get_meta_tags, 0, 0, 1)
01065        ZEND_ARG_INFO(0, filename)
01066        ZEND_ARG_INFO(0, use_include_path)
01067 ZEND_END_ARG_INFO()
01068 
01069 ZEND_BEGIN_ARG_INFO_EX(arginfo_file_get_contents, 0, 0, 1)
01070        ZEND_ARG_INFO(0, filename)
01071        ZEND_ARG_INFO(0, flags)
01072        ZEND_ARG_INFO(0, context)
01073        ZEND_ARG_INFO(0, offset)
01074        ZEND_ARG_INFO(0, maxlen)
01075 ZEND_END_ARG_INFO()
01076 
01077 ZEND_BEGIN_ARG_INFO_EX(arginfo_file_put_contents, 0, 0, 2)
01078        ZEND_ARG_INFO(0, filename)
01079        ZEND_ARG_INFO(0, data)
01080        ZEND_ARG_INFO(0, flags)
01081        ZEND_ARG_INFO(0, context)
01082 ZEND_END_ARG_INFO()
01083 
01084 ZEND_BEGIN_ARG_INFO_EX(arginfo_file, 0, 0, 1)
01085        ZEND_ARG_INFO(0, filename)
01086        ZEND_ARG_INFO(0, flags)
01087        ZEND_ARG_INFO(0, context)
01088 ZEND_END_ARG_INFO()
01089 
01090 ZEND_BEGIN_ARG_INFO(arginfo_tempnam, 0)
01091        ZEND_ARG_INFO(0, dir)
01092        ZEND_ARG_INFO(0, prefix)
01093 ZEND_END_ARG_INFO()
01094 
01095 ZEND_BEGIN_ARG_INFO(arginfo_tmpfile, 0)
01096 ZEND_END_ARG_INFO()
01097 
01098 ZEND_BEGIN_ARG_INFO_EX(arginfo_fopen, 0, 0, 2)
01099        ZEND_ARG_INFO(0, filename)
01100        ZEND_ARG_INFO(0, mode)
01101        ZEND_ARG_INFO(0, use_include_path)
01102        ZEND_ARG_INFO(0, context)
01103 ZEND_END_ARG_INFO()
01104 
01105 ZEND_BEGIN_ARG_INFO(arginfo_fclose, 0)
01106        ZEND_ARG_INFO(0, fp)
01107 ZEND_END_ARG_INFO()
01108 
01109 ZEND_BEGIN_ARG_INFO(arginfo_popen, 0)
01110        ZEND_ARG_INFO(0, command)
01111        ZEND_ARG_INFO(0, mode)
01112 ZEND_END_ARG_INFO()
01113 
01114 ZEND_BEGIN_ARG_INFO(arginfo_pclose, 0)
01115        ZEND_ARG_INFO(0, fp)
01116 ZEND_END_ARG_INFO()
01117 
01118 ZEND_BEGIN_ARG_INFO(arginfo_feof, 0)
01119        ZEND_ARG_INFO(0, fp)
01120 ZEND_END_ARG_INFO()
01121 
01122 ZEND_BEGIN_ARG_INFO_EX(arginfo_fgets, 0, 0, 1)
01123        ZEND_ARG_INFO(0, fp)
01124        ZEND_ARG_INFO(0, length)
01125 ZEND_END_ARG_INFO()
01126 
01127 ZEND_BEGIN_ARG_INFO(arginfo_fgetc, 0)
01128        ZEND_ARG_INFO(0, fp)
01129 ZEND_END_ARG_INFO()
01130 
01131 ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetss, 0, 0, 1)
01132        ZEND_ARG_INFO(0, fp)
01133        ZEND_ARG_INFO(0, length)
01134        ZEND_ARG_INFO(0, allowable_tags)
01135 ZEND_END_ARG_INFO()
01136 
01137 ZEND_BEGIN_ARG_INFO_EX(arginfo_fscanf, 1, 0, 2)
01138        ZEND_ARG_INFO(0, stream)
01139        ZEND_ARG_INFO(0, format)
01140        ZEND_ARG_INFO(1, ...)
01141 ZEND_END_ARG_INFO()
01142 
01143 ZEND_BEGIN_ARG_INFO_EX(arginfo_fwrite, 0, 0, 2)
01144        ZEND_ARG_INFO(0, fp)
01145        ZEND_ARG_INFO(0, str)
01146        ZEND_ARG_INFO(0, length)
01147 ZEND_END_ARG_INFO()
01148 
01149 ZEND_BEGIN_ARG_INFO(arginfo_fflush, 0)
01150        ZEND_ARG_INFO(0, fp)
01151 ZEND_END_ARG_INFO()
01152 
01153 ZEND_BEGIN_ARG_INFO(arginfo_rewind, 0)
01154        ZEND_ARG_INFO(0, fp)
01155 ZEND_END_ARG_INFO()
01156 
01157 ZEND_BEGIN_ARG_INFO(arginfo_ftell, 0)
01158        ZEND_ARG_INFO(0, fp)
01159 ZEND_END_ARG_INFO()
01160 
01161 ZEND_BEGIN_ARG_INFO_EX(arginfo_fseek, 0, 0, 2)
01162        ZEND_ARG_INFO(0, fp)
01163        ZEND_ARG_INFO(0, offset)
01164        ZEND_ARG_INFO(0, whence)
01165 ZEND_END_ARG_INFO()
01166 
01167 ZEND_BEGIN_ARG_INFO_EX(arginfo_mkdir, 0, 0, 1)
01168        ZEND_ARG_INFO(0, pathname)
01169        ZEND_ARG_INFO(0, mode)
01170        ZEND_ARG_INFO(0, recursive)
01171        ZEND_ARG_INFO(0, context)
01172 ZEND_END_ARG_INFO()
01173 
01174 ZEND_BEGIN_ARG_INFO_EX(arginfo_rmdir, 0, 0, 1)
01175        ZEND_ARG_INFO(0, dirname)
01176        ZEND_ARG_INFO(0, context)
01177 ZEND_END_ARG_INFO()
01178 
01179 ZEND_BEGIN_ARG_INFO_EX(arginfo_readfile, 0, 0, 1)
01180        ZEND_ARG_INFO(0, filename)
01181        ZEND_ARG_INFO(0, flags)
01182        ZEND_ARG_INFO(0, context)
01183 ZEND_END_ARG_INFO()
01184 
01185 ZEND_BEGIN_ARG_INFO_EX(arginfo_umask, 0, 0, 0)
01186        ZEND_ARG_INFO(0, mask)
01187 ZEND_END_ARG_INFO()
01188 
01189 ZEND_BEGIN_ARG_INFO(arginfo_fpassthru, 0)
01190        ZEND_ARG_INFO(0, fp)
01191 ZEND_END_ARG_INFO()
01192 
01193 ZEND_BEGIN_ARG_INFO_EX(arginfo_rename, 0, 0, 2)
01194        ZEND_ARG_INFO(0, old_name)
01195        ZEND_ARG_INFO(0, new_name)
01196        ZEND_ARG_INFO(0, context)
01197 ZEND_END_ARG_INFO()
01198 
01199 ZEND_BEGIN_ARG_INFO_EX(arginfo_unlink, 0, 0, 1)
01200        ZEND_ARG_INFO(0, filename)
01201        ZEND_ARG_INFO(0, context)
01202 ZEND_END_ARG_INFO()
01203 
01204 ZEND_BEGIN_ARG_INFO(arginfo_ftruncate, 0)
01205        ZEND_ARG_INFO(0, fp)
01206        ZEND_ARG_INFO(0, size)
01207 ZEND_END_ARG_INFO()
01208 
01209 ZEND_BEGIN_ARG_INFO(arginfo_fstat, 0)
01210        ZEND_ARG_INFO(0, fp)
01211 ZEND_END_ARG_INFO()
01212 
01213 ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2)
01214        ZEND_ARG_INFO(0, source_file)
01215        ZEND_ARG_INFO(0, destination_file)
01216        ZEND_ARG_INFO(0, context)
01217 ZEND_END_ARG_INFO()
01218 
01219 ZEND_BEGIN_ARG_INFO(arginfo_fread, 0)
01220        ZEND_ARG_INFO(0, fp)
01221        ZEND_ARG_INFO(0, length)
01222 ZEND_END_ARG_INFO()
01223 
01224 ZEND_BEGIN_ARG_INFO_EX(arginfo_fputcsv, 0, 0, 2)
01225        ZEND_ARG_INFO(0, fp)
01226        ZEND_ARG_INFO(0, fields) /* ARRAY_INFO(0, fields, 1) */
01227        ZEND_ARG_INFO(0, delimiter)
01228        ZEND_ARG_INFO(0, enclosure)
01229 ZEND_END_ARG_INFO()
01230 
01231 ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetcsv, 0, 0, 1)
01232        ZEND_ARG_INFO(0, fp)
01233        ZEND_ARG_INFO(0, length)
01234        ZEND_ARG_INFO(0, delimiter)
01235        ZEND_ARG_INFO(0, enclosure)
01236        ZEND_ARG_INFO(0, escape)
01237 ZEND_END_ARG_INFO()
01238 
01239 #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
01240 ZEND_BEGIN_ARG_INFO(arginfo_realpath, 0)
01241        ZEND_ARG_INFO(0, path)
01242 ZEND_END_ARG_INFO()
01243 #endif
01244 
01245 #ifdef HAVE_FNMATCH
01246 ZEND_BEGIN_ARG_INFO_EX(arginfo_fnmatch, 0, 0, 2)
01247        ZEND_ARG_INFO(0, pattern)
01248        ZEND_ARG_INFO(0, filename)
01249        ZEND_ARG_INFO(0, flags)
01250 ZEND_END_ARG_INFO()
01251 #endif
01252 
01253 ZEND_BEGIN_ARG_INFO(arginfo_sys_get_temp_dir, 0)
01254 ZEND_END_ARG_INFO()
01255 /* }}} */
01256 /* {{{ filestat.c */
01257 ZEND_BEGIN_ARG_INFO(arginfo_disk_total_space, 0)
01258        ZEND_ARG_INFO(0, path)
01259 ZEND_END_ARG_INFO()
01260 
01261 ZEND_BEGIN_ARG_INFO(arginfo_disk_free_space, 0)
01262        ZEND_ARG_INFO(0, path)
01263 ZEND_END_ARG_INFO()
01264 
01265 #ifndef NETWARE
01266 ZEND_BEGIN_ARG_INFO(arginfo_chgrp, 0)
01267        ZEND_ARG_INFO(0, filename)
01268        ZEND_ARG_INFO(0, group)
01269 ZEND_END_ARG_INFO()
01270 
01271 ZEND_BEGIN_ARG_INFO(arginfo_chown, 0)
01272        ZEND_ARG_INFO(0, filename)
01273        ZEND_ARG_INFO(0, user)
01274 ZEND_END_ARG_INFO()
01275 #endif
01276 
01277 #if HAVE_LCHOWN
01278 ZEND_BEGIN_ARG_INFO(arginfo_lchgrp, 0)
01279        ZEND_ARG_INFO(0, filename)
01280        ZEND_ARG_INFO(0, group)
01281 ZEND_END_ARG_INFO()
01282 
01283 ZEND_BEGIN_ARG_INFO(arginfo_lchown, 0)
01284        ZEND_ARG_INFO(0, filename)
01285        ZEND_ARG_INFO(0, user)
01286 ZEND_END_ARG_INFO()
01287 #endif
01288 
01289 ZEND_BEGIN_ARG_INFO(arginfo_chmod, 0)
01290        ZEND_ARG_INFO(0, filename)
01291        ZEND_ARG_INFO(0, mode)
01292 ZEND_END_ARG_INFO()
01293 
01294 #if HAVE_UTIME
01295 ZEND_BEGIN_ARG_INFO_EX(arginfo_touch, 0, 0, 1)
01296        ZEND_ARG_INFO(0, filename)
01297        ZEND_ARG_INFO(0, time)
01298        ZEND_ARG_INFO(0, atime)
01299 ZEND_END_ARG_INFO()
01300 #endif
01301 
01302 ZEND_BEGIN_ARG_INFO_EX(arginfo_clearstatcache, 0, 0, 0)
01303        ZEND_ARG_INFO(0, clear_realpath_cache)
01304        ZEND_ARG_INFO(0, filename)
01305 ZEND_END_ARG_INFO()
01306 
01307 ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_size, 0)
01308 ZEND_END_ARG_INFO()
01309 
01310 ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_get, 0)
01311 ZEND_END_ARG_INFO()
01312 
01313 ZEND_BEGIN_ARG_INFO(arginfo_fileperms, 0)
01314        ZEND_ARG_INFO(0, filename)
01315 ZEND_END_ARG_INFO()
01316 
01317 ZEND_BEGIN_ARG_INFO(arginfo_fileinode, 0)
01318        ZEND_ARG_INFO(0, filename)
01319 ZEND_END_ARG_INFO()
01320 
01321 ZEND_BEGIN_ARG_INFO(arginfo_filesize, 0)
01322        ZEND_ARG_INFO(0, filename)
01323 ZEND_END_ARG_INFO()
01324 
01325 ZEND_BEGIN_ARG_INFO(arginfo_fileowner, 0)
01326        ZEND_ARG_INFO(0, filename)
01327 ZEND_END_ARG_INFO()
01328 
01329 ZEND_BEGIN_ARG_INFO(arginfo_filegroup, 0)
01330        ZEND_ARG_INFO(0, filename)
01331 ZEND_END_ARG_INFO()
01332 
01333 ZEND_BEGIN_ARG_INFO(arginfo_fileatime, 0)
01334        ZEND_ARG_INFO(0, filename)
01335 ZEND_END_ARG_INFO()
01336 
01337 ZEND_BEGIN_ARG_INFO(arginfo_filemtime, 0)
01338        ZEND_ARG_INFO(0, filename)
01339 ZEND_END_ARG_INFO()
01340 
01341 ZEND_BEGIN_ARG_INFO(arginfo_filectime, 0)
01342        ZEND_ARG_INFO(0, filename)
01343 ZEND_END_ARG_INFO()
01344 
01345 ZEND_BEGIN_ARG_INFO(arginfo_filetype, 0)
01346        ZEND_ARG_INFO(0, filename)
01347 ZEND_END_ARG_INFO()
01348 
01349 ZEND_BEGIN_ARG_INFO(arginfo_is_writable, 0)
01350        ZEND_ARG_INFO(0, filename)
01351 ZEND_END_ARG_INFO()
01352 
01353 ZEND_BEGIN_ARG_INFO(arginfo_is_readable, 0)
01354        ZEND_ARG_INFO(0, filename)
01355 ZEND_END_ARG_INFO()
01356 
01357 ZEND_BEGIN_ARG_INFO(arginfo_is_executable, 0)
01358        ZEND_ARG_INFO(0, filename)
01359 ZEND_END_ARG_INFO()
01360 
01361 ZEND_BEGIN_ARG_INFO(arginfo_is_file, 0)
01362        ZEND_ARG_INFO(0, filename)
01363 ZEND_END_ARG_INFO()
01364 
01365 ZEND_BEGIN_ARG_INFO(arginfo_is_dir, 0)
01366        ZEND_ARG_INFO(0, filename)
01367 ZEND_END_ARG_INFO()
01368 
01369 ZEND_BEGIN_ARG_INFO(arginfo_is_link, 0)
01370        ZEND_ARG_INFO(0, filename)
01371 ZEND_END_ARG_INFO()
01372 
01373 ZEND_BEGIN_ARG_INFO(arginfo_file_exists, 0)
01374        ZEND_ARG_INFO(0, filename)
01375 ZEND_END_ARG_INFO()
01376 
01377 ZEND_BEGIN_ARG_INFO(arginfo_lstat, 0)
01378        ZEND_ARG_INFO(0, filename)
01379 ZEND_END_ARG_INFO()
01380 
01381 ZEND_BEGIN_ARG_INFO(arginfo_stat, 0)
01382        ZEND_ARG_INFO(0, filename)
01383 ZEND_END_ARG_INFO()
01384 /* }}} */
01385 /* {{{ formatted_print.c */
01386 ZEND_BEGIN_ARG_INFO_EX(arginfo_sprintf, 0, 0, 2)
01387        ZEND_ARG_INFO(0, format)
01388        ZEND_ARG_INFO(0, arg1)
01389        ZEND_ARG_INFO(0, ...)
01390 ZEND_END_ARG_INFO()
01391 
01392 ZEND_BEGIN_ARG_INFO(arginfo_vsprintf, 0)
01393        ZEND_ARG_INFO(0, format)
01394        ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
01395 ZEND_END_ARG_INFO()
01396 
01397 ZEND_BEGIN_ARG_INFO_EX(arginfo_printf, 0, 0, 1)
01398        ZEND_ARG_INFO(0, format)
01399        ZEND_ARG_INFO(0, arg1)
01400        ZEND_ARG_INFO(0, ...)
01401 ZEND_END_ARG_INFO()
01402 
01403 ZEND_BEGIN_ARG_INFO(arginfo_vprintf, 0)
01404        ZEND_ARG_INFO(0, format)
01405        ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
01406 ZEND_END_ARG_INFO()
01407 
01408 ZEND_BEGIN_ARG_INFO_EX(arginfo_fprintf, 0, 0, 2)
01409        ZEND_ARG_INFO(0, stream)
01410        ZEND_ARG_INFO(0, format)
01411        ZEND_ARG_INFO(0, arg1)
01412        ZEND_ARG_INFO(0, ...)
01413 ZEND_END_ARG_INFO()
01414 
01415 ZEND_BEGIN_ARG_INFO(arginfo_vfprintf, 0)
01416        ZEND_ARG_INFO(0, stream)
01417        ZEND_ARG_INFO(0, format)
01418        ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
01419 ZEND_END_ARG_INFO()
01420 /* }}} */
01421 /* {{{ fsock.c */
01422 ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
01423        ZEND_ARG_INFO(0, hostname)
01424        ZEND_ARG_INFO(0, port)
01425        ZEND_ARG_INFO(1, errno)
01426        ZEND_ARG_INFO(1, errstr)
01427        ZEND_ARG_INFO(0, timeout)
01428 ZEND_END_ARG_INFO()
01429 
01430 ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 2)
01431        ZEND_ARG_INFO(0, hostname)
01432        ZEND_ARG_INFO(0, port)
01433        ZEND_ARG_INFO(1, errno)
01434        ZEND_ARG_INFO(1, errstr)
01435        ZEND_ARG_INFO(0, timeout)
01436 ZEND_END_ARG_INFO()
01437 /* }}} */
01438 /* {{{ ftok.c */
01439 #if HAVE_FTOK
01440 ZEND_BEGIN_ARG_INFO(arginfo_ftok, 0)
01441        ZEND_ARG_INFO(0, pathname)
01442        ZEND_ARG_INFO(0, proj)
01443 ZEND_END_ARG_INFO()
01444 #endif
01445 /* }}} */
01446 /* {{{ head.c */
01447 ZEND_BEGIN_ARG_INFO_EX(arginfo_header, 0, 0, 1)
01448        ZEND_ARG_INFO(0, header)
01449        ZEND_ARG_INFO(0, replace)
01450        ZEND_ARG_INFO(0, http_response_code)
01451 ZEND_END_ARG_INFO()
01452 
01453 ZEND_BEGIN_ARG_INFO_EX(arginfo_header_remove, 0, 0, 0)
01454        ZEND_ARG_INFO(0, name)
01455 ZEND_END_ARG_INFO()
01456 
01457 ZEND_BEGIN_ARG_INFO_EX(arginfo_setcookie, 0, 0, 1)
01458        ZEND_ARG_INFO(0, name)
01459        ZEND_ARG_INFO(0, value)
01460        ZEND_ARG_INFO(0, expires)
01461        ZEND_ARG_INFO(0, path)
01462        ZEND_ARG_INFO(0, domain)
01463        ZEND_ARG_INFO(0, secure)
01464 ZEND_END_ARG_INFO()
01465 
01466 ZEND_BEGIN_ARG_INFO_EX(arginfo_setrawcookie, 0, 0, 1)
01467        ZEND_ARG_INFO(0, name)
01468        ZEND_ARG_INFO(0, value)
01469        ZEND_ARG_INFO(0, expires)
01470        ZEND_ARG_INFO(0, path)
01471        ZEND_ARG_INFO(0, domain)
01472        ZEND_ARG_INFO(0, secure)
01473 ZEND_END_ARG_INFO()
01474 
01475 ZEND_BEGIN_ARG_INFO_EX(arginfo_headers_sent, 0, 0, 0)
01476        ZEND_ARG_INFO(1, file)
01477        ZEND_ARG_INFO(1, line)
01478 ZEND_END_ARG_INFO()
01479 
01480 ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0)
01481 ZEND_END_ARG_INFO()
01482 /* }}} */
01483 /* {{{ html.c */
01484 ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars, 0, 0, 1)
01485        ZEND_ARG_INFO(0, string)
01486        ZEND_ARG_INFO(0, quote_style)
01487        ZEND_ARG_INFO(0, charset)
01488        ZEND_ARG_INFO(0, double_encode)
01489 ZEND_END_ARG_INFO()
01490 
01491 ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars_decode, 0, 0, 1)
01492        ZEND_ARG_INFO(0, string)
01493        ZEND_ARG_INFO(0, quote_style)
01494 ZEND_END_ARG_INFO()
01495 
01496 ZEND_BEGIN_ARG_INFO_EX(arginfo_html_entity_decode, 0, 0, 1)
01497        ZEND_ARG_INFO(0, string)
01498        ZEND_ARG_INFO(0, quote_style)
01499        ZEND_ARG_INFO(0, charset)
01500 ZEND_END_ARG_INFO()
01501 
01502 ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlentities, 0, 0, 1)
01503        ZEND_ARG_INFO(0, string)
01504        ZEND_ARG_INFO(0, quote_style)
01505        ZEND_ARG_INFO(0, charset)
01506        ZEND_ARG_INFO(0, double_encode)
01507 ZEND_END_ARG_INFO()
01508 
01509 ZEND_BEGIN_ARG_INFO_EX(arginfo_get_html_translation_table, 0, 0, 0)
01510        ZEND_ARG_INFO(0, table)
01511        ZEND_ARG_INFO(0, quote_style)
01512 ZEND_END_ARG_INFO()
01513 
01514 /* }}} */
01515 /* {{{ http.c */
01516 ZEND_BEGIN_ARG_INFO_EX(arginfo_http_build_query, 0, 0, 1)
01517        ZEND_ARG_INFO(0, formdata)
01518        ZEND_ARG_INFO(0, prefix)
01519        ZEND_ARG_INFO(0, arg_separator)
01520 ZEND_END_ARG_INFO()
01521 /* }}} */
01522 /* {{{ image.c */
01523 ZEND_BEGIN_ARG_INFO(arginfo_image_type_to_mime_type, 0)
01524        ZEND_ARG_INFO(0, imagetype)
01525 ZEND_END_ARG_INFO()
01526 
01527 ZEND_BEGIN_ARG_INFO_EX(arginfo_image_type_to_extension, 0, 0, 1)
01528        ZEND_ARG_INFO(0, imagetype)
01529        ZEND_ARG_INFO(0, include_dot)
01530 ZEND_END_ARG_INFO()
01531 
01532 ZEND_BEGIN_ARG_INFO_EX(arginfo_getimagesize, 0, 0, 1)
01533        ZEND_ARG_INFO(0, imagefile)
01534        ZEND_ARG_INFO(1, info) /* ARRAY_INFO(1, info, 1) */
01535 ZEND_END_ARG_INFO()
01536 /* }}} */
01537 /* {{{ info.c */
01538 ZEND_BEGIN_ARG_INFO_EX(arginfo_phpinfo, 0, 0, 0)
01539        ZEND_ARG_INFO(0, what)
01540 ZEND_END_ARG_INFO()
01541 
01542 ZEND_BEGIN_ARG_INFO_EX(arginfo_phpversion, 0, 0, 0)
01543        ZEND_ARG_INFO(0, extension)
01544 ZEND_END_ARG_INFO()
01545 
01546 ZEND_BEGIN_ARG_INFO_EX(arginfo_phpcredits, 0, 0, 0)
01547        ZEND_ARG_INFO(0, flag)
01548 ZEND_END_ARG_INFO()
01549 
01550 ZEND_BEGIN_ARG_INFO(arginfo_php_logo_guid, 0)
01551 ZEND_END_ARG_INFO()
01552 
01553 ZEND_BEGIN_ARG_INFO(arginfo_php_real_logo_guid, 0)
01554 ZEND_END_ARG_INFO()
01555 
01556 ZEND_BEGIN_ARG_INFO(arginfo_php_egg_logo_guid, 0)
01557 ZEND_END_ARG_INFO()
01558 
01559 ZEND_BEGIN_ARG_INFO(arginfo_zend_logo_guid, 0)
01560 ZEND_END_ARG_INFO()
01561 
01562 ZEND_BEGIN_ARG_INFO(arginfo_php_sapi_name, 0)
01563 ZEND_END_ARG_INFO()
01564 
01565 ZEND_BEGIN_ARG_INFO(arginfo_php_uname, 0)
01566 ZEND_END_ARG_INFO()
01567 
01568 ZEND_BEGIN_ARG_INFO(arginfo_php_ini_scanned_files, 0)
01569 ZEND_END_ARG_INFO()
01570 
01571 ZEND_BEGIN_ARG_INFO(arginfo_php_ini_loaded_file, 0)
01572 ZEND_END_ARG_INFO()
01573 /* }}} */
01574 /* {{{ iptc.c */
01575 ZEND_BEGIN_ARG_INFO_EX(arginfo_iptcembed, 0, 0, 2)
01576        ZEND_ARG_INFO(0, iptcdata)
01577        ZEND_ARG_INFO(0, jpeg_file_name)
01578        ZEND_ARG_INFO(0, spool)
01579 ZEND_END_ARG_INFO()
01580 
01581 ZEND_BEGIN_ARG_INFO(arginfo_iptcparse, 0)
01582        ZEND_ARG_INFO(0, iptcdata)
01583 ZEND_END_ARG_INFO()
01584 /* }}} */
01585 /* {{{ lcg.c */
01586 ZEND_BEGIN_ARG_INFO(arginfo_lcg_value, 0)
01587 ZEND_END_ARG_INFO()
01588 /* }}} */
01589 /* {{{ levenshtein.c */
01590 ZEND_BEGIN_ARG_INFO(arginfo_levenshtein, 0)
01591        ZEND_ARG_INFO(0, str1)
01592        ZEND_ARG_INFO(0, str2)
01593        ZEND_ARG_INFO(0, cost_ins)
01594        ZEND_ARG_INFO(0, cost_rep)
01595        ZEND_ARG_INFO(0, cost_del)
01596 ZEND_END_ARG_INFO()
01597 /* }}} */
01598 /* {{{ link.c */
01599 #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
01600 ZEND_BEGIN_ARG_INFO(arginfo_readlink, 0)
01601        ZEND_ARG_INFO(0, filename)
01602 ZEND_END_ARG_INFO()
01603 
01604 ZEND_BEGIN_ARG_INFO(arginfo_linkinfo, 0)
01605        ZEND_ARG_INFO(0, filename)
01606 ZEND_END_ARG_INFO()
01607 
01608 ZEND_BEGIN_ARG_INFO(arginfo_symlink, 0)
01609        ZEND_ARG_INFO(0, target)
01610        ZEND_ARG_INFO(0, link)
01611 ZEND_END_ARG_INFO()
01612 
01613 ZEND_BEGIN_ARG_INFO(arginfo_link, 0)
01614        ZEND_ARG_INFO(0, target)
01615        ZEND_ARG_INFO(0, link)
01616 ZEND_END_ARG_INFO()
01617 #endif
01618 /* }}} */
01619 /* {{{ mail.c */
01620 ZEND_BEGIN_ARG_INFO(arginfo_ezmlm_hash, 0)
01621        ZEND_ARG_INFO(0, addr)
01622 ZEND_END_ARG_INFO()
01623 
01624 ZEND_BEGIN_ARG_INFO_EX(arginfo_mail, 0, 0, 3)
01625        ZEND_ARG_INFO(0, to)
01626        ZEND_ARG_INFO(0, subject)
01627        ZEND_ARG_INFO(0, message)
01628        ZEND_ARG_INFO(0, additional_headers)
01629        ZEND_ARG_INFO(0, additional_parameters)
01630 ZEND_END_ARG_INFO()
01631 /* }}} */
01632 /* {{{ math.c */
01633 ZEND_BEGIN_ARG_INFO(arginfo_abs, 0)
01634        ZEND_ARG_INFO(0, number)
01635 ZEND_END_ARG_INFO()
01636 
01637 ZEND_BEGIN_ARG_INFO(arginfo_ceil, 0)
01638        ZEND_ARG_INFO(0, number)
01639 ZEND_END_ARG_INFO()
01640 
01641 ZEND_BEGIN_ARG_INFO(arginfo_floor, 0)
01642        ZEND_ARG_INFO(0, number)
01643 ZEND_END_ARG_INFO()
01644 
01645 ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1)
01646        ZEND_ARG_INFO(0, number)
01647        ZEND_ARG_INFO(0, precision)
01648        ZEND_ARG_INFO(0, mode)
01649 ZEND_END_ARG_INFO()
01650 
01651 ZEND_BEGIN_ARG_INFO(arginfo_sin, 0)
01652        ZEND_ARG_INFO(0, number)
01653 ZEND_END_ARG_INFO()
01654 
01655 ZEND_BEGIN_ARG_INFO(arginfo_cos, 0)
01656        ZEND_ARG_INFO(0, number)
01657 ZEND_END_ARG_INFO()
01658 
01659 ZEND_BEGIN_ARG_INFO(arginfo_tan, 0)
01660        ZEND_ARG_INFO(0, number)
01661 ZEND_END_ARG_INFO()
01662 
01663 ZEND_BEGIN_ARG_INFO(arginfo_asin, 0)
01664        ZEND_ARG_INFO(0, number)
01665 ZEND_END_ARG_INFO()
01666 
01667 ZEND_BEGIN_ARG_INFO(arginfo_acos, 0)
01668        ZEND_ARG_INFO(0, number)
01669 ZEND_END_ARG_INFO()
01670 
01671 ZEND_BEGIN_ARG_INFO(arginfo_atan, 0)
01672        ZEND_ARG_INFO(0, number)
01673 ZEND_END_ARG_INFO()
01674 
01675 ZEND_BEGIN_ARG_INFO(arginfo_atan2, 0)
01676        ZEND_ARG_INFO(0, y)
01677        ZEND_ARG_INFO(0, x)
01678 ZEND_END_ARG_INFO()
01679 
01680 ZEND_BEGIN_ARG_INFO(arginfo_sinh, 0)
01681        ZEND_ARG_INFO(0, number)
01682 ZEND_END_ARG_INFO()
01683 
01684 ZEND_BEGIN_ARG_INFO(arginfo_cosh, 0)
01685        ZEND_ARG_INFO(0, number)
01686 ZEND_END_ARG_INFO()
01687 
01688 ZEND_BEGIN_ARG_INFO(arginfo_tanh, 0)
01689        ZEND_ARG_INFO(0, number)
01690 ZEND_END_ARG_INFO()
01691 
01692 ZEND_BEGIN_ARG_INFO(arginfo_asinh, 0)
01693        ZEND_ARG_INFO(0, number)
01694 ZEND_END_ARG_INFO()
01695 
01696 ZEND_BEGIN_ARG_INFO(arginfo_acosh, 0)
01697        ZEND_ARG_INFO(0, number)
01698 ZEND_END_ARG_INFO()
01699 
01700 ZEND_BEGIN_ARG_INFO(arginfo_atanh, 0)
01701        ZEND_ARG_INFO(0, number)
01702 ZEND_END_ARG_INFO()
01703 
01704 ZEND_BEGIN_ARG_INFO(arginfo_pi, 0)
01705 ZEND_END_ARG_INFO()
01706 
01707 ZEND_BEGIN_ARG_INFO(arginfo_is_finite, 0)
01708        ZEND_ARG_INFO(0, val)
01709 ZEND_END_ARG_INFO()
01710 
01711 ZEND_BEGIN_ARG_INFO(arginfo_is_infinite, 0)
01712        ZEND_ARG_INFO(0, val)
01713 ZEND_END_ARG_INFO()
01714 
01715 ZEND_BEGIN_ARG_INFO(arginfo_is_nan, 0)
01716        ZEND_ARG_INFO(0, val)
01717 ZEND_END_ARG_INFO()
01718 
01719 ZEND_BEGIN_ARG_INFO(arginfo_pow, 0)
01720        ZEND_ARG_INFO(0, base)
01721        ZEND_ARG_INFO(0, exponent)
01722 ZEND_END_ARG_INFO()
01723 
01724 ZEND_BEGIN_ARG_INFO(arginfo_exp, 0)
01725        ZEND_ARG_INFO(0, number)
01726 ZEND_END_ARG_INFO()
01727 
01728 ZEND_BEGIN_ARG_INFO(arginfo_expm1, 0)
01729        ZEND_ARG_INFO(0, number)
01730 ZEND_END_ARG_INFO()
01731 
01732 ZEND_BEGIN_ARG_INFO(arginfo_log1p, 0)
01733        ZEND_ARG_INFO(0, number)
01734 ZEND_END_ARG_INFO()
01735 
01736 ZEND_BEGIN_ARG_INFO_EX(arginfo_log, 0, 0, 1)
01737        ZEND_ARG_INFO(0, number)
01738        ZEND_ARG_INFO(0, base)
01739 ZEND_END_ARG_INFO()
01740 
01741 ZEND_BEGIN_ARG_INFO(arginfo_log10, 0)
01742        ZEND_ARG_INFO(0, number)
01743 ZEND_END_ARG_INFO()
01744 
01745 ZEND_BEGIN_ARG_INFO(arginfo_sqrt, 0)
01746        ZEND_ARG_INFO(0, number)
01747 ZEND_END_ARG_INFO()
01748 
01749 ZEND_BEGIN_ARG_INFO(arginfo_hypot, 0)
01750        ZEND_ARG_INFO(0, num1)
01751        ZEND_ARG_INFO(0, num2)
01752 ZEND_END_ARG_INFO()
01753 
01754 ZEND_BEGIN_ARG_INFO(arginfo_deg2rad, 0)
01755        ZEND_ARG_INFO(0, number)
01756 ZEND_END_ARG_INFO()
01757 
01758 ZEND_BEGIN_ARG_INFO(arginfo_rad2deg, 0)
01759        ZEND_ARG_INFO(0, number)
01760 ZEND_END_ARG_INFO()
01761 
01762 ZEND_BEGIN_ARG_INFO(arginfo_bindec, 0)
01763        ZEND_ARG_INFO(0, binary_number)
01764 ZEND_END_ARG_INFO()
01765 
01766 ZEND_BEGIN_ARG_INFO(arginfo_hexdec, 0)
01767        ZEND_ARG_INFO(0, hexadecimal_number)
01768 ZEND_END_ARG_INFO()
01769 
01770 ZEND_BEGIN_ARG_INFO(arginfo_octdec, 0)
01771        ZEND_ARG_INFO(0, octal_number)
01772 ZEND_END_ARG_INFO()
01773 
01774 ZEND_BEGIN_ARG_INFO(arginfo_decbin, 0)
01775        ZEND_ARG_INFO(0, decimal_number)
01776 ZEND_END_ARG_INFO()
01777 
01778 ZEND_BEGIN_ARG_INFO(arginfo_decoct, 0)
01779        ZEND_ARG_INFO(0, decimal_number)
01780 ZEND_END_ARG_INFO()
01781 
01782 ZEND_BEGIN_ARG_INFO(arginfo_dechex, 0)
01783        ZEND_ARG_INFO(0, decimal_number)
01784 ZEND_END_ARG_INFO()
01785 
01786 ZEND_BEGIN_ARG_INFO(arginfo_base_convert, 0)
01787        ZEND_ARG_INFO(0, number)
01788        ZEND_ARG_INFO(0, frombase)
01789        ZEND_ARG_INFO(0, tobase)
01790 ZEND_END_ARG_INFO()
01791 
01792 ZEND_BEGIN_ARG_INFO_EX(arginfo_number_format, 0, 0, 1)
01793        ZEND_ARG_INFO(0, number)
01794        ZEND_ARG_INFO(0, num_decimal_places)
01795        ZEND_ARG_INFO(0, dec_seperator)
01796        ZEND_ARG_INFO(0, thousands_seperator)
01797 ZEND_END_ARG_INFO()
01798 
01799 ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
01800        ZEND_ARG_INFO(0, x)
01801        ZEND_ARG_INFO(0, y)
01802 ZEND_END_ARG_INFO()
01803 /* }}} */
01804 /* {{{ md5.c */
01805 ZEND_BEGIN_ARG_INFO_EX(arginfo_md5, 0, 0, 1)
01806        ZEND_ARG_INFO(0, str)
01807        ZEND_ARG_INFO(0, raw_output)
01808 ZEND_END_ARG_INFO()
01809 
01810 ZEND_BEGIN_ARG_INFO_EX(arginfo_md5_file, 0, 0, 1)
01811        ZEND_ARG_INFO(0, filename)
01812        ZEND_ARG_INFO(0, raw_output)
01813 ZEND_END_ARG_INFO()
01814 /* }}} */
01815 /* {{{ metaphone.c */
01816 ZEND_BEGIN_ARG_INFO_EX(arginfo_metaphone, 0, 0, 1)
01817        ZEND_ARG_INFO(0, text)
01818        ZEND_ARG_INFO(0, phones)
01819 ZEND_END_ARG_INFO()
01820 /* }}} */
01821 /* {{{ microtime.c */
01822 #ifdef HAVE_GETTIMEOFDAY
01823 ZEND_BEGIN_ARG_INFO_EX(arginfo_microtime, 0, 0, 0)
01824        ZEND_ARG_INFO(0, get_as_float)
01825 ZEND_END_ARG_INFO()
01826 
01827 ZEND_BEGIN_ARG_INFO_EX(arginfo_gettimeofday, 0, 0, 0)
01828        ZEND_ARG_INFO(0, get_as_float)
01829 ZEND_END_ARG_INFO()
01830 #endif
01831 
01832 #ifdef HAVE_GETRUSAGE
01833 ZEND_BEGIN_ARG_INFO_EX(arginfo_getrusage, 0, 0, 0)
01834        ZEND_ARG_INFO(0, who)
01835 ZEND_END_ARG_INFO()
01836 #endif
01837 /* }}} */
01838 /* {{{ pack.c */
01839 ZEND_BEGIN_ARG_INFO_EX(arginfo_pack, 0, 0, 2)
01840        ZEND_ARG_INFO(0, format)
01841        ZEND_ARG_INFO(0, arg1)
01842        ZEND_ARG_INFO(0, ...)
01843 ZEND_END_ARG_INFO()
01844 
01845 ZEND_BEGIN_ARG_INFO(arginfo_unpack, 0)
01846        ZEND_ARG_INFO(0, format)
01847        ZEND_ARG_INFO(0, input)
01848 ZEND_END_ARG_INFO()
01849 /* }}} */
01850 /* {{{ pageinfo.c */
01851 ZEND_BEGIN_ARG_INFO(arginfo_getmyuid, 0)
01852 ZEND_END_ARG_INFO()
01853 
01854 ZEND_BEGIN_ARG_INFO(arginfo_getmygid, 0)
01855 ZEND_END_ARG_INFO()
01856 
01857 ZEND_BEGIN_ARG_INFO(arginfo_getmypid, 0)
01858 ZEND_END_ARG_INFO()
01859 
01860 ZEND_BEGIN_ARG_INFO(arginfo_getmyinode, 0)
01861 ZEND_END_ARG_INFO()
01862 
01863 ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0)
01864 ZEND_END_ARG_INFO()
01865 /* }}} */
01866 /* {{{ proc_open.c */
01867 #ifdef PHP_CAN_SUPPORT_PROC_OPEN
01868 ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_terminate, 0, 0, 1)
01869        ZEND_ARG_INFO(0, process)
01870        ZEND_ARG_INFO(0, signal)
01871 ZEND_END_ARG_INFO()
01872 
01873 ZEND_BEGIN_ARG_INFO(arginfo_proc_close, 0)
01874        ZEND_ARG_INFO(0, process)
01875 ZEND_END_ARG_INFO()
01876 
01877 ZEND_BEGIN_ARG_INFO(arginfo_proc_get_status, 0)
01878        ZEND_ARG_INFO(0, process)
01879 ZEND_END_ARG_INFO()
01880 
01881 ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_open, 0, 0, 3)
01882        ZEND_ARG_INFO(0, command)
01883        ZEND_ARG_INFO(0, descriptorspec) /* ARRAY_INFO(0, descriptorspec, 1) */
01884        ZEND_ARG_INFO(1, pipes) /* ARRAY_INFO(1, pipes, 1) */
01885        ZEND_ARG_INFO(0, cwd)
01886        ZEND_ARG_INFO(0, env) /* ARRAY_INFO(0, env, 1) */
01887        ZEND_ARG_INFO(0, other_options) /* ARRAY_INFO(0, other_options, 1) */
01888 ZEND_END_ARG_INFO()
01889 #endif
01890 /* }}} */
01891 /* {{{ quot_print.c */
01892 ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_decode, 0)
01893        ZEND_ARG_INFO(0, str)
01894 ZEND_END_ARG_INFO()
01895 /* }}} */
01896 /* {{{ quot_print.c */
01897 ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_encode, 0)
01898        ZEND_ARG_INFO(0, str)
01899 ZEND_END_ARG_INFO()
01900 /* }}} */
01901 /* {{{ rand.c */
01902 ZEND_BEGIN_ARG_INFO_EX(arginfo_srand, 0, 0, 0)
01903        ZEND_ARG_INFO(0, seed)
01904 ZEND_END_ARG_INFO()
01905 
01906 ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_srand, 0, 0, 0)
01907        ZEND_ARG_INFO(0, seed)
01908 ZEND_END_ARG_INFO()
01909 
01910 ZEND_BEGIN_ARG_INFO_EX(arginfo_rand, 0, 0, 0)
01911        ZEND_ARG_INFO(0, min)
01912        ZEND_ARG_INFO(0, max)
01913 ZEND_END_ARG_INFO()
01914 
01915 ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_rand, 0, 0, 0)
01916        ZEND_ARG_INFO(0, min)
01917        ZEND_ARG_INFO(0, max)
01918 ZEND_END_ARG_INFO()
01919 
01920 ZEND_BEGIN_ARG_INFO(arginfo_getrandmax, 0)
01921 ZEND_END_ARG_INFO()
01922 
01923 ZEND_BEGIN_ARG_INFO(arginfo_mt_getrandmax, 0)
01924 ZEND_END_ARG_INFO()
01925 /* }}} */
01926 /* {{{ sha1.c */
01927 ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1, 0, 0, 1)
01928        ZEND_ARG_INFO(0, str)
01929        ZEND_ARG_INFO(0, raw_output)
01930 ZEND_END_ARG_INFO()
01931 
01932 ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1_file, 0, 0, 1)
01933        ZEND_ARG_INFO(0, filename)
01934        ZEND_ARG_INFO(0, raw_output)
01935 ZEND_END_ARG_INFO()
01936 /* }}} */
01937 /* {{{ soundex.c */
01938 ZEND_BEGIN_ARG_INFO(arginfo_soundex, 0)
01939        ZEND_ARG_INFO(0, str)
01940 ZEND_END_ARG_INFO()
01941 /* }}} */
01942 /* {{{ streamsfuncs.c */
01943 #if HAVE_SOCKETPAIR
01944 ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_pair, 0)
01945        ZEND_ARG_INFO(0, domain)
01946        ZEND_ARG_INFO(0, type)
01947        ZEND_ARG_INFO(0, protocol)
01948 ZEND_END_ARG_INFO()
01949 #endif
01950 
01951 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1)
01952        ZEND_ARG_INFO(0, remoteaddress)
01953        ZEND_ARG_INFO(1, errcode)
01954        ZEND_ARG_INFO(1, errstring)
01955        ZEND_ARG_INFO(0, timeout)
01956        ZEND_ARG_INFO(0, flags)
01957        ZEND_ARG_INFO(0, context)
01958 ZEND_END_ARG_INFO()
01959 
01960 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1)
01961        ZEND_ARG_INFO(0, localaddress)
01962        ZEND_ARG_INFO(1, errcode)
01963        ZEND_ARG_INFO(1, errstring)
01964        ZEND_ARG_INFO(0, flags)
01965        ZEND_ARG_INFO(0, context)
01966 ZEND_END_ARG_INFO()
01967 
01968 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1)
01969        ZEND_ARG_INFO(0, serverstream)
01970        ZEND_ARG_INFO(0, timeout)
01971        ZEND_ARG_INFO(1, peername)
01972 ZEND_END_ARG_INFO()
01973 
01974 ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_get_name, 0)
01975        ZEND_ARG_INFO(0, stream)
01976        ZEND_ARG_INFO(0, want_peer)
01977 ZEND_END_ARG_INFO()
01978 
01979 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_sendto, 0, 0, 2)
01980        ZEND_ARG_INFO(0, stream)
01981        ZEND_ARG_INFO(0, data)
01982        ZEND_ARG_INFO(0, flags)
01983        ZEND_ARG_INFO(0, target_addr)
01984 ZEND_END_ARG_INFO()
01985 
01986 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_recvfrom, 0, 0, 2)
01987        ZEND_ARG_INFO(0, stream)
01988        ZEND_ARG_INFO(0, amount)
01989        ZEND_ARG_INFO(0, flags)
01990        ZEND_ARG_INFO(1, remote_addr)
01991 ZEND_END_ARG_INFO()
01992 
01993 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_contents, 0, 0, 1)
01994        ZEND_ARG_INFO(0, source)
01995        ZEND_ARG_INFO(0, maxlen)
01996        ZEND_ARG_INFO(0, offset)
01997 ZEND_END_ARG_INFO()
01998 
01999 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_copy_to_stream, 0, 0, 2)
02000        ZEND_ARG_INFO(0, source)
02001        ZEND_ARG_INFO(0, dest)
02002        ZEND_ARG_INFO(0, maxlen)
02003        ZEND_ARG_INFO(0, pos)
02004 ZEND_END_ARG_INFO()
02005 
02006 ZEND_BEGIN_ARG_INFO(arginfo_stream_get_meta_data, 0)
02007        ZEND_ARG_INFO(0, fp)
02008 ZEND_END_ARG_INFO()
02009 
02010 ZEND_BEGIN_ARG_INFO(arginfo_stream_get_transports, 0)
02011 ZEND_END_ARG_INFO()
02012 
02013 ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0)
02014 ZEND_END_ARG_INFO()
02015 
02016 ZEND_BEGIN_ARG_INFO(arginfo_stream_resolve_include_path, 0)
02017        ZEND_ARG_INFO(0, filename)
02018 ZEND_END_ARG_INFO()
02019 
02020 ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0)
02021        ZEND_ARG_INFO(0, stream)
02022 ZEND_END_ARG_INFO()
02023 
02024 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_supports_lock, 0, 0, 1)
02025     ZEND_ARG_INFO(0, stream)
02026 ZEND_END_ARG_INFO()
02027 
02028 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4)
02029        ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */
02030        ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */
02031        ZEND_ARG_INFO(1, except_streams) /* ARRAY_INFO(1, except_streams, 1) */
02032        ZEND_ARG_INFO(0, tv_sec)
02033        ZEND_ARG_INFO(0, tv_usec)
02034 ZEND_END_ARG_INFO()
02035 
02036 ZEND_BEGIN_ARG_INFO(arginfo_stream_context_get_options, 0)
02037        ZEND_ARG_INFO(0, stream_or_context)
02038 ZEND_END_ARG_INFO()
02039 
02040 ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_option, 0)
02041        ZEND_ARG_INFO(0, stream_or_context)
02042        ZEND_ARG_INFO(0, wrappername)
02043        ZEND_ARG_INFO(0, optionname)
02044        ZEND_ARG_INFO(0, value)
02045 ZEND_END_ARG_INFO()
02046 
02047 ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_params, 0)
02048        ZEND_ARG_INFO(0, stream_or_context)
02049        ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
02050 ZEND_END_ARG_INFO()
02051 
02052 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_params, 0, ZEND_RETURN_VALUE, 1)
02053        ZEND_ARG_INFO(0, stream_or_context)
02054 ZEND_END_ARG_INFO()
02055 
02056 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0)
02057        ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
02058 ZEND_END_ARG_INFO()
02059 
02060 ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_default, 0)
02061        ZEND_ARG_INFO(0, options)
02062 ZEND_END_ARG_INFO()
02063 
02064 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0)
02065        ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
02066        ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */
02067 ZEND_END_ARG_INFO()
02068 
02069 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2)
02070        ZEND_ARG_INFO(0, stream)
02071        ZEND_ARG_INFO(0, filtername)
02072        ZEND_ARG_INFO(0, read_write)
02073        ZEND_ARG_INFO(0, filterparams)
02074 ZEND_END_ARG_INFO()
02075 
02076 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_append, 0, 0, 2)
02077        ZEND_ARG_INFO(0, stream)
02078        ZEND_ARG_INFO(0, filtername)
02079        ZEND_ARG_INFO(0, read_write)
02080        ZEND_ARG_INFO(0, filterparams)
02081 ZEND_END_ARG_INFO()
02082 
02083 ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_remove, 0)
02084        ZEND_ARG_INFO(0, stream_filter)
02085 ZEND_END_ARG_INFO()
02086 
02087 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_line, 0, 0, 2)
02088        ZEND_ARG_INFO(0, stream)
02089        ZEND_ARG_INFO(0, maxlen)
02090        ZEND_ARG_INFO(0, ending)
02091 ZEND_END_ARG_INFO()
02092 
02093 ZEND_BEGIN_ARG_INFO(arginfo_stream_set_blocking, 0)
02094        ZEND_ARG_INFO(0, socket)
02095        ZEND_ARG_INFO(0, mode)
02096 ZEND_END_ARG_INFO()
02097 
02098 #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
02099 ZEND_BEGIN_ARG_INFO(arginfo_stream_set_timeout, 0)
02100        ZEND_ARG_INFO(0, stream)
02101        ZEND_ARG_INFO(0, seconds)
02102        ZEND_ARG_INFO(0, microseconds)
02103 ZEND_END_ARG_INFO()
02104 #endif
02105 
02106 ZEND_BEGIN_ARG_INFO(arginfo_stream_set_read_buffer, 0)
02107        ZEND_ARG_INFO(0, fp)
02108        ZEND_ARG_INFO(0, buffer)
02109 ZEND_END_ARG_INFO()
02110 
02111 ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0)
02112        ZEND_ARG_INFO(0, fp)
02113        ZEND_ARG_INFO(0, buffer)
02114 ZEND_END_ARG_INFO()
02115 
02116 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_enable_crypto, 0, 0, 2)
02117        ZEND_ARG_INFO(0, stream)
02118        ZEND_ARG_INFO(0, enable)
02119        ZEND_ARG_INFO(0, cryptokind)
02120        ZEND_ARG_INFO(0, sessionstream)
02121 ZEND_END_ARG_INFO()
02122 
02123 #ifdef HAVE_SHUTDOWN
02124 ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_shutdown, 0)
02125        ZEND_ARG_INFO(0, stream)
02126        ZEND_ARG_INFO(0, how)
02127 ZEND_END_ARG_INFO()
02128 #endif
02129 /* }}} */
02130 /* {{{ string.c */
02131 ZEND_BEGIN_ARG_INFO(arginfo_bin2hex, 0)
02132        ZEND_ARG_INFO(0, data)
02133 ZEND_END_ARG_INFO()
02134 
02135 ZEND_BEGIN_ARG_INFO_EX(arginfo_strspn, 0, 0, 2)
02136        ZEND_ARG_INFO(0, str)
02137        ZEND_ARG_INFO(0, mask)
02138        ZEND_ARG_INFO(0, start)
02139        ZEND_ARG_INFO(0, len)
02140 ZEND_END_ARG_INFO()
02141 
02142 ZEND_BEGIN_ARG_INFO_EX(arginfo_strcspn, 0, 0, 2)
02143        ZEND_ARG_INFO(0, str)
02144        ZEND_ARG_INFO(0, mask)
02145        ZEND_ARG_INFO(0, start)
02146        ZEND_ARG_INFO(0, len)
02147 ZEND_END_ARG_INFO()
02148 
02149 #if HAVE_NL_LANGINFO
02150 ZEND_BEGIN_ARG_INFO(arginfo_nl_langinfo, 0)
02151        ZEND_ARG_INFO(0, item)
02152 ZEND_END_ARG_INFO()
02153 #endif
02154 
02155 #ifdef HAVE_STRCOLL
02156 ZEND_BEGIN_ARG_INFO(arginfo_strcoll, 0)
02157        ZEND_ARG_INFO(0, str1)
02158        ZEND_ARG_INFO(0, str2)
02159 ZEND_END_ARG_INFO()
02160 #endif
02161 
02162 ZEND_BEGIN_ARG_INFO_EX(arginfo_trim, 0, 0, 1)
02163        ZEND_ARG_INFO(0, str)
02164        ZEND_ARG_INFO(0, character_mask)
02165 ZEND_END_ARG_INFO()
02166 
02167 ZEND_BEGIN_ARG_INFO_EX(arginfo_rtrim, 0, 0, 1)
02168        ZEND_ARG_INFO(0, str)
02169        ZEND_ARG_INFO(0, character_mask)
02170 ZEND_END_ARG_INFO()
02171 
02172 ZEND_BEGIN_ARG_INFO_EX(arginfo_ltrim, 0, 0, 1)
02173        ZEND_ARG_INFO(0, str)
02174        ZEND_ARG_INFO(0, character_mask)
02175 ZEND_END_ARG_INFO()
02176 
02177 ZEND_BEGIN_ARG_INFO_EX(arginfo_wordwrap, 0, 0, 1)
02178        ZEND_ARG_INFO(0, str)
02179        ZEND_ARG_INFO(0, width)
02180        ZEND_ARG_INFO(0, break)
02181        ZEND_ARG_INFO(0, cut)
02182 ZEND_END_ARG_INFO()
02183 
02184 ZEND_BEGIN_ARG_INFO_EX(arginfo_explode, 0, 0, 2)
02185        ZEND_ARG_INFO(0, separator)
02186        ZEND_ARG_INFO(0, str)
02187        ZEND_ARG_INFO(0, limit)
02188 ZEND_END_ARG_INFO()
02189 
02190 ZEND_BEGIN_ARG_INFO(arginfo_implode, 0)
02191        ZEND_ARG_INFO(0, glue)
02192        ZEND_ARG_INFO(0, pieces)
02193 ZEND_END_ARG_INFO()
02194 
02195 ZEND_BEGIN_ARG_INFO(arginfo_strtok, 0)
02196        ZEND_ARG_INFO(0, str)
02197        ZEND_ARG_INFO(0, token)
02198 ZEND_END_ARG_INFO()
02199 
02200 ZEND_BEGIN_ARG_INFO(arginfo_strtoupper, 0)
02201        ZEND_ARG_INFO(0, str)
02202 ZEND_END_ARG_INFO()
02203 
02204 ZEND_BEGIN_ARG_INFO(arginfo_strtolower, 0)
02205        ZEND_ARG_INFO(0, str)
02206 ZEND_END_ARG_INFO()
02207 
02208 ZEND_BEGIN_ARG_INFO_EX(arginfo_basename, 0, 0, 1)
02209        ZEND_ARG_INFO(0, path)
02210        ZEND_ARG_INFO(0, suffix)
02211 ZEND_END_ARG_INFO()
02212 
02213 ZEND_BEGIN_ARG_INFO(arginfo_dirname, 0)
02214        ZEND_ARG_INFO(0, path)
02215 ZEND_END_ARG_INFO()
02216 
02217 ZEND_BEGIN_ARG_INFO_EX(arginfo_pathinfo, 0, 0, 1)
02218        ZEND_ARG_INFO(0, path)
02219        ZEND_ARG_INFO(0, options)
02220 ZEND_END_ARG_INFO()
02221 
02222 ZEND_BEGIN_ARG_INFO_EX(arginfo_stristr, 0, 0, 2)
02223        ZEND_ARG_INFO(0, haystack)
02224        ZEND_ARG_INFO(0, needle)
02225        ZEND_ARG_INFO(0, part)
02226 ZEND_END_ARG_INFO()
02227 
02228 ZEND_BEGIN_ARG_INFO_EX(arginfo_strstr, 0, 0, 2)
02229        ZEND_ARG_INFO(0, haystack)
02230        ZEND_ARG_INFO(0, needle)
02231        ZEND_ARG_INFO(0, part)
02232 ZEND_END_ARG_INFO()
02233 
02234 ZEND_BEGIN_ARG_INFO_EX(arginfo_strpos, 0, 0, 2)
02235        ZEND_ARG_INFO(0, haystack)
02236        ZEND_ARG_INFO(0, needle)
02237        ZEND_ARG_INFO(0, offset)
02238 ZEND_END_ARG_INFO()
02239 
02240 ZEND_BEGIN_ARG_INFO_EX(arginfo_stripos, 0, 0, 2)
02241        ZEND_ARG_INFO(0, haystack)
02242        ZEND_ARG_INFO(0, needle)
02243        ZEND_ARG_INFO(0, offset)
02244 ZEND_END_ARG_INFO()
02245 
02246 ZEND_BEGIN_ARG_INFO_EX(arginfo_strrpos, 0, 0, 2)
02247        ZEND_ARG_INFO(0, haystack)
02248        ZEND_ARG_INFO(0, needle)
02249        ZEND_ARG_INFO(0, offset)
02250 ZEND_END_ARG_INFO()
02251 
02252 ZEND_BEGIN_ARG_INFO_EX(arginfo_strripos, 0, 0, 2)
02253        ZEND_ARG_INFO(0, haystack)
02254        ZEND_ARG_INFO(0, needle)
02255        ZEND_ARG_INFO(0, offset)
02256 ZEND_END_ARG_INFO()
02257 
02258 ZEND_BEGIN_ARG_INFO(arginfo_strrchr, 0)
02259        ZEND_ARG_INFO(0, haystack)
02260        ZEND_ARG_INFO(0, needle)
02261 ZEND_END_ARG_INFO()
02262 
02263 ZEND_BEGIN_ARG_INFO_EX(arginfo_chunk_split, 0, 0, 1)
02264        ZEND_ARG_INFO(0, str)
02265        ZEND_ARG_INFO(0, chunklen)
02266        ZEND_ARG_INFO(0, ending)
02267 ZEND_END_ARG_INFO()
02268 
02269 ZEND_BEGIN_ARG_INFO_EX(arginfo_substr, 0, 0, 2)
02270        ZEND_ARG_INFO(0, str)
02271        ZEND_ARG_INFO(0, start)
02272        ZEND_ARG_INFO(0, length)
02273 ZEND_END_ARG_INFO()
02274 
02275 ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_replace, 0, 0, 3)
02276        ZEND_ARG_INFO(0, str)
02277        ZEND_ARG_INFO(0, replace)
02278        ZEND_ARG_INFO(0, start)
02279        ZEND_ARG_INFO(0, length)
02280 ZEND_END_ARG_INFO()
02281 
02282 ZEND_BEGIN_ARG_INFO(arginfo_quotemeta, 0)
02283        ZEND_ARG_INFO(0, str)
02284 ZEND_END_ARG_INFO()
02285 
02286 ZEND_BEGIN_ARG_INFO(arginfo_ord, 0)
02287        ZEND_ARG_INFO(0, character)
02288 ZEND_END_ARG_INFO()
02289 
02290 ZEND_BEGIN_ARG_INFO(arginfo_chr, 0)
02291        ZEND_ARG_INFO(0, codepoint)
02292 ZEND_END_ARG_INFO()
02293 
02294 ZEND_BEGIN_ARG_INFO(arginfo_ucfirst, 0)
02295        ZEND_ARG_INFO(0, str)
02296 ZEND_END_ARG_INFO()
02297 
02298 ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0)
02299        ZEND_ARG_INFO(0, str)
02300 ZEND_END_ARG_INFO()
02301        
02302 ZEND_BEGIN_ARG_INFO(arginfo_ucwords, 0)
02303        ZEND_ARG_INFO(0, str)
02304 ZEND_END_ARG_INFO()
02305 
02306 ZEND_BEGIN_ARG_INFO_EX(arginfo_strtr, 0, 0, 2)
02307        ZEND_ARG_INFO(0, str)
02308        ZEND_ARG_INFO(0, from)
02309        ZEND_ARG_INFO(0, to)
02310 ZEND_END_ARG_INFO()
02311 
02312 ZEND_BEGIN_ARG_INFO(arginfo_strrev, 0)
02313        ZEND_ARG_INFO(0, str)
02314 ZEND_END_ARG_INFO()
02315 
02316 ZEND_BEGIN_ARG_INFO_EX(arginfo_similar_text, 0, 0, 2)
02317        ZEND_ARG_INFO(0, str1)
02318        ZEND_ARG_INFO(0, str2)
02319        ZEND_ARG_INFO(1, percent)
02320 ZEND_END_ARG_INFO()
02321 
02322 ZEND_BEGIN_ARG_INFO(arginfo_addcslashes, 0)
02323        ZEND_ARG_INFO(0, str)
02324        ZEND_ARG_INFO(0, charlist)
02325 ZEND_END_ARG_INFO()
02326 
02327 ZEND_BEGIN_ARG_INFO(arginfo_addslashes, 0)
02328        ZEND_ARG_INFO(0, str)
02329 ZEND_END_ARG_INFO()
02330 
02331 ZEND_BEGIN_ARG_INFO(arginfo_stripcslashes, 0)
02332        ZEND_ARG_INFO(0, str)
02333 ZEND_END_ARG_INFO()
02334 
02335 ZEND_BEGIN_ARG_INFO(arginfo_stripslashes, 0)
02336        ZEND_ARG_INFO(0, str)
02337 ZEND_END_ARG_INFO()
02338 
02339 ZEND_BEGIN_ARG_INFO_EX(arginfo_str_replace, 0, 0, 3)
02340        ZEND_ARG_INFO(0, search)
02341        ZEND_ARG_INFO(0, replace)
02342        ZEND_ARG_INFO(0, subject)
02343        ZEND_ARG_INFO(1, replace_count)
02344 ZEND_END_ARG_INFO()
02345 
02346 ZEND_BEGIN_ARG_INFO_EX(arginfo_str_ireplace, 0, 0, 3)
02347        ZEND_ARG_INFO(0, search)
02348        ZEND_ARG_INFO(0, replace)
02349        ZEND_ARG_INFO(0, subject)
02350        ZEND_ARG_INFO(1, replace_count)
02351 ZEND_END_ARG_INFO()
02352 
02353 ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrev, 0, 0, 1)
02354        ZEND_ARG_INFO(0, str)
02355        ZEND_ARG_INFO(0, max_chars_per_line)
02356 ZEND_END_ARG_INFO()
02357 
02358 ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrevc, 0, 0, 1)
02359        ZEND_ARG_INFO(0, str)
02360        ZEND_ARG_INFO(0, max_chars_per_line)
02361 ZEND_END_ARG_INFO()
02362 
02363 ZEND_BEGIN_ARG_INFO_EX(arginfo_nl2br, 0, 0, 1)
02364        ZEND_ARG_INFO(0, str)
02365        ZEND_ARG_INFO(0, is_xhtml)
02366 ZEND_END_ARG_INFO()
02367 
02368 ZEND_BEGIN_ARG_INFO_EX(arginfo_strip_tags, 0, 0, 1)
02369        ZEND_ARG_INFO(0, str)
02370        ZEND_ARG_INFO(0, allowable_tags)
02371 ZEND_END_ARG_INFO()
02372 
02373 ZEND_BEGIN_ARG_INFO_EX(arginfo_setlocale, 0, 0, 2)
02374        ZEND_ARG_INFO(0, category)
02375        ZEND_ARG_INFO(0, locale)
02376        ZEND_ARG_INFO(0, ...)
02377 ZEND_END_ARG_INFO()
02378 
02379 ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_str, 0, 0, 1)
02380        ZEND_ARG_INFO(0, encoded_string)
02381        ZEND_ARG_INFO(1, result)
02382 ZEND_END_ARG_INFO()
02383 
02384 ZEND_BEGIN_ARG_INFO_EX(arginfo_str_getcsv, 0, 0, 1)
02385        ZEND_ARG_INFO(0, string)
02386        ZEND_ARG_INFO(0, delimiter)
02387        ZEND_ARG_INFO(0, enclosure)
02388        ZEND_ARG_INFO(0, escape)
02389 ZEND_END_ARG_INFO()
02390 
02391 ZEND_BEGIN_ARG_INFO(arginfo_str_repeat, 0)
02392        ZEND_ARG_INFO(0, input)
02393        ZEND_ARG_INFO(0, mult)
02394 ZEND_END_ARG_INFO()
02395 
02396 ZEND_BEGIN_ARG_INFO_EX(arginfo_count_chars, 0, 0, 1)
02397        ZEND_ARG_INFO(0, input)
02398        ZEND_ARG_INFO(0, mode)
02399 ZEND_END_ARG_INFO()
02400 
02401 ZEND_BEGIN_ARG_INFO(arginfo_strnatcmp, 0)
02402        ZEND_ARG_INFO(0, s1)
02403        ZEND_ARG_INFO(0, s2)
02404 ZEND_END_ARG_INFO()
02405 
02406 ZEND_BEGIN_ARG_INFO(arginfo_localeconv, 0)
02407 ZEND_END_ARG_INFO()
02408 
02409 ZEND_BEGIN_ARG_INFO(arginfo_strnatcasecmp, 0)
02410        ZEND_ARG_INFO(0, s1)
02411        ZEND_ARG_INFO(0, s2)
02412 ZEND_END_ARG_INFO()
02413 
02414 ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_count, 0, 0, 2)
02415        ZEND_ARG_INFO(0, haystack)
02416        ZEND_ARG_INFO(0, needle)
02417        ZEND_ARG_INFO(0, offset)
02418        ZEND_ARG_INFO(0, length)
02419 ZEND_END_ARG_INFO()
02420 
02421 ZEND_BEGIN_ARG_INFO_EX(arginfo_str_pad, 0, 0, 2)
02422        ZEND_ARG_INFO(0, input)
02423        ZEND_ARG_INFO(0, pad_length)
02424        ZEND_ARG_INFO(0, pad_string)
02425        ZEND_ARG_INFO(0, pad_type)
02426 ZEND_END_ARG_INFO()
02427 
02428 ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 1, 0, 2)
02429        ZEND_ARG_INFO(0, str)
02430        ZEND_ARG_INFO(0, format)
02431        ZEND_ARG_INFO(1, ...)
02432 ZEND_END_ARG_INFO()
02433 
02434 ZEND_BEGIN_ARG_INFO(arginfo_str_rot13, 0)
02435        ZEND_ARG_INFO(0, str)
02436 ZEND_END_ARG_INFO()
02437 
02438 ZEND_BEGIN_ARG_INFO(arginfo_str_shuffle, 0)
02439        ZEND_ARG_INFO(0, str)
02440 ZEND_END_ARG_INFO()
02441 
02442 ZEND_BEGIN_ARG_INFO_EX(arginfo_str_word_count, 0, 0, 1)
02443        ZEND_ARG_INFO(0, str)
02444        ZEND_ARG_INFO(0, format)
02445        ZEND_ARG_INFO(0, charlist)
02446 ZEND_END_ARG_INFO()
02447 
02448 #ifdef HAVE_STRFMON
02449 ZEND_BEGIN_ARG_INFO(arginfo_money_format, 0)
02450        ZEND_ARG_INFO(0, format)
02451        ZEND_ARG_INFO(0, value)
02452 ZEND_END_ARG_INFO()
02453 #endif
02454 
02455 ZEND_BEGIN_ARG_INFO_EX(arginfo_str_split, 0, 0, 1)
02456        ZEND_ARG_INFO(0, str)
02457        ZEND_ARG_INFO(0, split_length)
02458 ZEND_END_ARG_INFO()
02459 
02460 ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 1)
02461        ZEND_ARG_INFO(0, haystack)
02462        ZEND_ARG_INFO(0, char_list)
02463 ZEND_END_ARG_INFO()
02464 
02465 ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_compare, 0, 0, 3)
02466        ZEND_ARG_INFO(0, main_str)
02467        ZEND_ARG_INFO(0, str)
02468        ZEND_ARG_INFO(0, offset)
02469        ZEND_ARG_INFO(0, length)
02470        ZEND_ARG_INFO(0, case_sensitivity)
02471 ZEND_END_ARG_INFO()
02472 /* }}} */
02473 /* {{{ syslog.c */
02474 #ifdef HAVE_SYSLOG_H
02475 ZEND_BEGIN_ARG_INFO(arginfo_define_syslog_variables, 0)
02476 ZEND_END_ARG_INFO()
02477 
02478 ZEND_BEGIN_ARG_INFO(arginfo_openlog, 0)
02479        ZEND_ARG_INFO(0, ident)
02480        ZEND_ARG_INFO(0, option)
02481        ZEND_ARG_INFO(0, facility)
02482 ZEND_END_ARG_INFO()
02483 
02484 ZEND_BEGIN_ARG_INFO(arginfo_closelog, 0)
02485 ZEND_END_ARG_INFO()
02486 
02487 ZEND_BEGIN_ARG_INFO(arginfo_syslog, 0)
02488        ZEND_ARG_INFO(0, priority)
02489        ZEND_ARG_INFO(0, message)
02490 ZEND_END_ARG_INFO()
02491 #endif
02492 /* }}} */
02493 /* {{{ type.c */
02494 ZEND_BEGIN_ARG_INFO(arginfo_gettype, 0)
02495        ZEND_ARG_INFO(0, var)
02496 ZEND_END_ARG_INFO()
02497 
02498 ZEND_BEGIN_ARG_INFO(arginfo_settype, 0)
02499        ZEND_ARG_INFO(1, var)
02500        ZEND_ARG_INFO(0, type)
02501 ZEND_END_ARG_INFO()
02502 
02503 ZEND_BEGIN_ARG_INFO_EX(arginfo_intval, 0, 0, 1)
02504        ZEND_ARG_INFO(0, var)
02505        ZEND_ARG_INFO(0, base)
02506 ZEND_END_ARG_INFO()
02507 
02508 ZEND_BEGIN_ARG_INFO(arginfo_floatval, 0)
02509        ZEND_ARG_INFO(0, var)
02510 ZEND_END_ARG_INFO()
02511 
02512 ZEND_BEGIN_ARG_INFO(arginfo_strval, 0)
02513        ZEND_ARG_INFO(0, var)
02514 ZEND_END_ARG_INFO()
02515 
02516 ZEND_BEGIN_ARG_INFO(arginfo_is_null, 0)
02517        ZEND_ARG_INFO(0, var)
02518 ZEND_END_ARG_INFO()
02519 
02520 ZEND_BEGIN_ARG_INFO(arginfo_is_resource, 0)
02521        ZEND_ARG_INFO(0, var)
02522 ZEND_END_ARG_INFO()
02523 
02524 ZEND_BEGIN_ARG_INFO(arginfo_is_bool, 0)
02525        ZEND_ARG_INFO(0, var)
02526 ZEND_END_ARG_INFO()
02527 
02528 ZEND_BEGIN_ARG_INFO(arginfo_is_long, 0)
02529        ZEND_ARG_INFO(0, var)
02530 ZEND_END_ARG_INFO()
02531 
02532 ZEND_BEGIN_ARG_INFO(arginfo_is_float, 0)
02533        ZEND_ARG_INFO(0, var)
02534 ZEND_END_ARG_INFO()
02535 
02536 ZEND_BEGIN_ARG_INFO(arginfo_is_string, 0)
02537        ZEND_ARG_INFO(0, var)
02538 ZEND_END_ARG_INFO()
02539 
02540 ZEND_BEGIN_ARG_INFO(arginfo_is_array, 0)
02541        ZEND_ARG_INFO(0, var)
02542 ZEND_END_ARG_INFO()
02543 
02544 ZEND_BEGIN_ARG_INFO(arginfo_is_object, 0)
02545        ZEND_ARG_INFO(0, var)
02546 ZEND_END_ARG_INFO()
02547 
02548 ZEND_BEGIN_ARG_INFO(arginfo_is_numeric, 0)
02549        ZEND_ARG_INFO(0, value)
02550 ZEND_END_ARG_INFO()
02551 
02552 ZEND_BEGIN_ARG_INFO(arginfo_is_scalar, 0)
02553        ZEND_ARG_INFO(0, value)
02554 ZEND_END_ARG_INFO()
02555 
02556 ZEND_BEGIN_ARG_INFO_EX(arginfo_is_callable, 0, 0, 1)
02557        ZEND_ARG_INFO(0, var)
02558        ZEND_ARG_INFO(0, syntax_only)
02559        ZEND_ARG_INFO(1, callable_name)
02560 ZEND_END_ARG_INFO()
02561 /* }}} */
02562 /* {{{ uniqid.c */
02563 #ifdef HAVE_GETTIMEOFDAY
02564 ZEND_BEGIN_ARG_INFO_EX(arginfo_uniqid, 0, 0, 0)
02565        ZEND_ARG_INFO(0, prefix)
02566        ZEND_ARG_INFO(0, more_entropy)
02567 ZEND_END_ARG_INFO()
02568 #endif
02569 /* }}} */
02570 /* {{{ url.c */
02571 ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1)
02572        ZEND_ARG_INFO(0, url)
02573        ZEND_ARG_INFO(0, component)
02574 ZEND_END_ARG_INFO()
02575 
02576 ZEND_BEGIN_ARG_INFO(arginfo_urlencode, 0)
02577        ZEND_ARG_INFO(0, str)
02578 ZEND_END_ARG_INFO()
02579 
02580 ZEND_BEGIN_ARG_INFO(arginfo_urldecode, 0)
02581        ZEND_ARG_INFO(0, str)
02582 ZEND_END_ARG_INFO()
02583 
02584 ZEND_BEGIN_ARG_INFO(arginfo_rawurlencode, 0)
02585        ZEND_ARG_INFO(0, str)
02586 ZEND_END_ARG_INFO()
02587 
02588 ZEND_BEGIN_ARG_INFO(arginfo_rawurldecode, 0)
02589        ZEND_ARG_INFO(0, str)
02590 ZEND_END_ARG_INFO()
02591 
02592 ZEND_BEGIN_ARG_INFO_EX(arginfo_get_headers, 0, 0, 1)
02593        ZEND_ARG_INFO(0, url)
02594        ZEND_ARG_INFO(0, format)
02595 ZEND_END_ARG_INFO()
02596 /* }}} */
02597 /* {{{ user_filters.c */
02598 ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_make_writeable, 0)
02599        ZEND_ARG_INFO(0, brigade)
02600 ZEND_END_ARG_INFO()
02601 
02602 ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_prepend, 0)
02603        ZEND_ARG_INFO(0, brigade)
02604        ZEND_ARG_INFO(0, bucket)
02605 ZEND_END_ARG_INFO()
02606 
02607 ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_append, 0)
02608        ZEND_ARG_INFO(0, brigade)
02609        ZEND_ARG_INFO(0, bucket)
02610 ZEND_END_ARG_INFO()
02611 
02612 ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_new, 0)
02613        ZEND_ARG_INFO(0, stream)
02614        ZEND_ARG_INFO(0, buffer)
02615 ZEND_END_ARG_INFO()
02616 
02617 ZEND_BEGIN_ARG_INFO(arginfo_stream_get_filters, 0)
02618 ZEND_END_ARG_INFO()
02619 
02620 ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_register, 0)
02621        ZEND_ARG_INFO(0, filtername)
02622        ZEND_ARG_INFO(0, classname)
02623 ZEND_END_ARG_INFO()
02624 /* }}} */
02625 /* {{{ uuencode.c */
02626 ZEND_BEGIN_ARG_INFO(arginfo_convert_uuencode, 0)
02627        ZEND_ARG_INFO(0, data)
02628 ZEND_END_ARG_INFO()
02629 
02630 ZEND_BEGIN_ARG_INFO(arginfo_convert_uudecode, 0)
02631        ZEND_ARG_INFO(0, data)
02632 ZEND_END_ARG_INFO()
02633 /* }}} */
02634 /* {{{ var.c */
02635 ZEND_BEGIN_ARG_INFO_EX(arginfo_var_dump, 0, 0, 1)
02636        ZEND_ARG_INFO(0, var)
02637        ZEND_ARG_INFO(0, ...)
02638 ZEND_END_ARG_INFO()
02639 
02640 ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_zval_dump, 0, 0, 1)
02641        ZEND_ARG_INFO(0, var)
02642        ZEND_ARG_INFO(0, ...)
02643 ZEND_END_ARG_INFO()
02644 
02645 ZEND_BEGIN_ARG_INFO_EX(arginfo_var_export, 0, 0, 1)
02646        ZEND_ARG_INFO(0, var)
02647        ZEND_ARG_INFO(0, return)
02648 ZEND_END_ARG_INFO()
02649 
02650 ZEND_BEGIN_ARG_INFO(arginfo_serialize, 0)
02651        ZEND_ARG_INFO(0, var)
02652 ZEND_END_ARG_INFO()
02653 
02654 ZEND_BEGIN_ARG_INFO(arginfo_unserialize, 0)
02655        ZEND_ARG_INFO(0, variable_representation)
02656 ZEND_END_ARG_INFO()
02657 
02658 ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_usage, 0, 0, 0)
02659        ZEND_ARG_INFO(0, real_usage)
02660 ZEND_END_ARG_INFO()
02661 
02662 ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_peak_usage, 0, 0, 0)
02663        ZEND_ARG_INFO(0, real_usage)
02664 ZEND_END_ARG_INFO()
02665 /* }}} */
02666 /* {{{ versioning.c */
02667 ZEND_BEGIN_ARG_INFO_EX(arginfo_version_compare, 0, 0, 2)
02668        ZEND_ARG_INFO(0, ver1)
02669        ZEND_ARG_INFO(0, ver2)
02670        ZEND_ARG_INFO(0, oper)
02671 ZEND_END_ARG_INFO()
02672 /* }}} */
02673 /* }}} */
02674 
02675 const zend_function_entry basic_functions[] = { /* {{{ */
02676        PHP_FE(constant,                                                                                                arginfo_constant)
02677        PHP_FE(bin2hex,                                                                                                        arginfo_bin2hex)
02678        PHP_FE(sleep,                                                                                                   arginfo_sleep)
02679        PHP_FE(usleep,                                                                                                         arginfo_usleep)
02680 #if HAVE_NANOSLEEP
02681        PHP_FE(time_nanosleep,                                                                                          arginfo_time_nanosleep)
02682        PHP_FE(time_sleep_until,                                                                                 arginfo_time_sleep_until)
02683 #endif
02684 
02685 #if HAVE_STRPTIME
02686        PHP_FE(strptime,                                                                                                arginfo_strptime)
02687 #endif
02688 
02689        PHP_FE(flush,                                                                                                   arginfo_flush)
02690        PHP_FE(wordwrap,                                                                                                arginfo_wordwrap)
02691        PHP_FE(htmlspecialchars,                                                                                 arginfo_htmlspecialchars)
02692        PHP_FE(htmlentities,                                                                                     arginfo_htmlentities)
02693        PHP_FE(html_entity_decode,                                                                               arginfo_html_entity_decode)
02694        PHP_FE(htmlspecialchars_decode,                                                                          arginfo_htmlspecialchars_decode)
02695        PHP_FE(get_html_translation_table,                                                                arginfo_get_html_translation_table)
02696        PHP_FE(sha1,                                                                                                    arginfo_sha1)
02697        PHP_FE(sha1_file,                                                                                               arginfo_sha1_file)
02698        PHP_NAMED_FE(md5,php_if_md5,                                                                             arginfo_md5)
02699        PHP_NAMED_FE(md5_file,php_if_md5_file,                                                            arginfo_md5_file)
02700        PHP_NAMED_FE(crc32,php_if_crc32,                                                                  arginfo_crc32)
02701 
02702        PHP_FE(iptcparse,                                                                                               arginfo_iptcparse)
02703        PHP_FE(iptcembed,                                                                                               arginfo_iptcembed)
02704        PHP_FE(getimagesize,                                                                                     arginfo_getimagesize)
02705        PHP_FE(image_type_to_mime_type,                                                                          arginfo_image_type_to_mime_type)
02706        PHP_FE(image_type_to_extension,                                                                          arginfo_image_type_to_extension)
02707 
02708        PHP_FE(phpinfo,                                                                                                        arginfo_phpinfo)
02709        PHP_FE(phpversion,                                                                                              arginfo_phpversion)
02710        PHP_FE(phpcredits,                                                                                              arginfo_phpcredits)
02711        PHP_FE(php_logo_guid,                                                                                           arginfo_php_logo_guid)
02712        PHP_FE(php_real_logo_guid,                                                                               arginfo_php_real_logo_guid)
02713        PHP_FE(php_egg_logo_guid,                                                                                arginfo_php_egg_logo_guid)
02714        PHP_FE(zend_logo_guid,                                                                                          arginfo_zend_logo_guid)
02715        PHP_FE(php_sapi_name,                                                                                           arginfo_php_sapi_name)
02716        PHP_FE(php_uname,                                                                                               arginfo_php_uname)
02717        PHP_FE(php_ini_scanned_files,                                                                            arginfo_php_ini_scanned_files)
02718        PHP_FE(php_ini_loaded_file,                                                                              arginfo_php_ini_loaded_file)
02719 
02720        PHP_FE(strnatcmp,                                                                                               arginfo_strnatcmp)
02721        PHP_FE(strnatcasecmp,                                                                                           arginfo_strnatcasecmp)
02722        PHP_FE(substr_count,                                                                                     arginfo_substr_count)
02723        PHP_FE(strspn,                                                                                                         arginfo_strspn)
02724        PHP_FE(strcspn,                                                                                                        arginfo_strcspn)
02725        PHP_FE(strtok,                                                                                                         arginfo_strtok)
02726        PHP_FE(strtoupper,                                                                                              arginfo_strtoupper)
02727        PHP_FE(strtolower,                                                                                              arginfo_strtolower)
02728        PHP_FE(strpos,                                                                                                         arginfo_strpos)
02729        PHP_FE(stripos,                                                                                                        arginfo_stripos)
02730        PHP_FE(strrpos,                                                                                                        arginfo_strrpos)
02731        PHP_FE(strripos,                                                                                                arginfo_strripos)
02732        PHP_FE(strrev,                                                                                                         arginfo_strrev)
02733        PHP_FE(hebrev,                                                                                                         arginfo_hebrev)
02734        PHP_FE(hebrevc,                                                                                                        arginfo_hebrevc)
02735        PHP_FE(nl2br,                                                                                                   arginfo_nl2br)
02736        PHP_FE(basename,                                                                                                arginfo_basename)
02737        PHP_FE(dirname,                                                                                                        arginfo_dirname)
02738        PHP_FE(pathinfo,                                                                                                arginfo_pathinfo)
02739        PHP_FE(stripslashes,                                                                                     arginfo_stripslashes)
02740        PHP_FE(stripcslashes,                                                                                           arginfo_stripcslashes)
02741        PHP_FE(strstr,                                                                                                         arginfo_strstr)
02742        PHP_FE(stristr,                                                                                                        arginfo_stristr)
02743        PHP_FE(strrchr,                                                                                                        arginfo_strrchr)
02744        PHP_FE(str_shuffle,                                                                                             arginfo_str_shuffle)
02745        PHP_FE(str_word_count,                                                                                          arginfo_str_word_count)
02746        PHP_FE(str_split,                                                                                               arginfo_str_split)
02747        PHP_FE(strpbrk,                                                                                                        arginfo_strpbrk)
02748        PHP_FE(substr_compare,                                                                                          arginfo_substr_compare)
02749 
02750 #ifdef HAVE_STRCOLL
02751        PHP_FE(strcoll,                                                                                                        arginfo_strcoll)
02752 #endif
02753 
02754 #ifdef HAVE_STRFMON
02755        PHP_FE(money_format,                                                                                     arginfo_money_format)
02756 #endif
02757 
02758        PHP_FE(substr,                                                                                                         arginfo_substr)
02759        PHP_FE(substr_replace,                                                                                          arginfo_substr_replace)
02760        PHP_FE(quotemeta,                                                                                               arginfo_quotemeta)
02761        PHP_FE(ucfirst,                                                                                                        arginfo_ucfirst)
02762        PHP_FE(lcfirst,                                                                                                        arginfo_lcfirst)
02763        PHP_FE(ucwords,                                                                                                        arginfo_ucwords)
02764        PHP_FE(strtr,                                                                                                   arginfo_strtr)
02765        PHP_FE(addslashes,                                                                                              arginfo_addslashes)
02766        PHP_FE(addcslashes,                                                                                             arginfo_addcslashes)
02767        PHP_FE(rtrim,                                                                                                   arginfo_rtrim)
02768        PHP_FE(str_replace,                                                                                             arginfo_str_replace)
02769        PHP_FE(str_ireplace,                                                                                     arginfo_str_ireplace)
02770        PHP_FE(str_repeat,                                                                                              arginfo_str_repeat)
02771        PHP_FE(count_chars,                                                                                             arginfo_count_chars)
02772        PHP_FE(chunk_split,                                                                                             arginfo_chunk_split)
02773        PHP_FE(trim,                                                                                                    arginfo_trim)
02774        PHP_FE(ltrim,                                                                                                   arginfo_ltrim)
02775        PHP_FE(strip_tags,                                                                                              arginfo_strip_tags)
02776        PHP_FE(similar_text,                                                                                     arginfo_similar_text)
02777        PHP_FE(explode,                                                                                                        arginfo_explode)
02778        PHP_FE(implode,                                                                                                        arginfo_implode)
02779        PHP_FALIAS(join,                          implode,                                                       arginfo_implode)
02780        PHP_FE(setlocale,                                                                                               arginfo_setlocale)
02781        PHP_FE(localeconv,                                                                                              arginfo_localeconv)
02782 
02783 #if HAVE_NL_LANGINFO
02784        PHP_FE(nl_langinfo,                                                                                             arginfo_nl_langinfo)
02785 #endif
02786 
02787        PHP_FE(soundex,                                                                                                        arginfo_soundex)
02788        PHP_FE(levenshtein,                                                                                             arginfo_levenshtein)
02789        PHP_FE(chr,                                                                                                            arginfo_chr)
02790        PHP_FE(ord,                                                                                                            arginfo_ord)
02791        PHP_FE(parse_str,                                                                                               arginfo_parse_str)
02792        PHP_FE(str_getcsv,                                                                                              arginfo_str_getcsv)
02793        PHP_FE(str_pad,                                                                                                        arginfo_str_pad)
02794        PHP_FALIAS(chop,                          rtrim,                                                         arginfo_rtrim)
02795        PHP_FALIAS(strchr,                        strstr,                                                               arginfo_strstr)
02796        PHP_NAMED_FE(sprintf,                     PHP_FN(user_sprintf),                                   arginfo_sprintf)
02797        PHP_NAMED_FE(printf,               PHP_FN(user_printf),                             arginfo_printf)
02798        PHP_FE(vprintf,                                                                                                        arginfo_vprintf)
02799        PHP_FE(vsprintf,                                                                                                arginfo_vsprintf)
02800        PHP_FE(fprintf,                                                                                                        arginfo_fprintf)
02801        PHP_FE(vfprintf,                                                                                                arginfo_vfprintf)
02802        PHP_FE(sscanf,                                                                                                         arginfo_sscanf)
02803        PHP_FE(fscanf,                                                                                                         arginfo_fscanf)
02804        PHP_FE(parse_url,                                                                                               arginfo_parse_url)
02805        PHP_FE(urlencode,                                                                                               arginfo_urlencode)
02806        PHP_FE(urldecode,                                                                                               arginfo_urldecode)
02807        PHP_FE(rawurlencode,                                                                                     arginfo_rawurlencode)
02808        PHP_FE(rawurldecode,                                                                                     arginfo_rawurldecode)
02809        PHP_FE(http_build_query,                                                                                 arginfo_http_build_query)
02810 
02811 #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
02812        PHP_FE(readlink,                                                                                                arginfo_readlink)
02813        PHP_FE(linkinfo,                                                                                                arginfo_linkinfo)
02814        PHP_FE(symlink,                                                                                                        arginfo_symlink)
02815        PHP_FE(link,                                                                                                    arginfo_link)
02816 #endif
02817 
02818        PHP_FE(unlink,                                                                                                         arginfo_unlink)
02819        PHP_FE(exec,                                                                                                    arginfo_exec)
02820        PHP_FE(system,                                                                                                         arginfo_system)
02821        PHP_FE(escapeshellcmd,                                                                                          arginfo_escapeshellcmd)
02822        PHP_FE(escapeshellarg,                                                                                          arginfo_escapeshellarg)
02823        PHP_FE(passthru,                                                                                                arginfo_passthru)
02824        PHP_FE(shell_exec,                                                                                              arginfo_shell_exec)
02825 #ifdef PHP_CAN_SUPPORT_PROC_OPEN
02826        PHP_FE(proc_open,                                                                                               arginfo_proc_open)
02827        PHP_FE(proc_close,                                                                                              arginfo_proc_close)
02828        PHP_FE(proc_terminate,                                                                                          arginfo_proc_terminate)
02829        PHP_FE(proc_get_status,                                                                                         arginfo_proc_get_status)
02830 #endif
02831 
02832 #ifdef HAVE_NICE
02833        PHP_FE(proc_nice,                                                                                               arginfo_proc_nice)
02834 #endif
02835 
02836        PHP_FE(rand,                                                                                                    arginfo_rand)
02837        PHP_FE(srand,                                                                                                   arginfo_srand)
02838        PHP_FE(getrandmax,                                                                                              arginfo_getrandmax)
02839        PHP_FE(mt_rand,                                                                                                        arginfo_mt_rand)
02840        PHP_FE(mt_srand,                                                                                                arginfo_mt_srand)
02841        PHP_FE(mt_getrandmax,                                                                                           arginfo_mt_getrandmax)
02842 
02843 #if HAVE_GETSERVBYNAME
02844        PHP_FE(getservbyname,                                                                                           arginfo_getservbyname)
02845 #endif
02846 
02847 #if HAVE_GETSERVBYPORT
02848        PHP_FE(getservbyport,                                                                                           arginfo_getservbyport)
02849 #endif
02850 
02851 #if HAVE_GETPROTOBYNAME
02852        PHP_FE(getprotobyname,                                                                                          arginfo_getprotobyname)
02853 #endif
02854 
02855 #if HAVE_GETPROTOBYNUMBER
02856        PHP_FE(getprotobynumber,                                                                                 arginfo_getprotobynumber)
02857 #endif
02858 
02859        PHP_FE(getmyuid,                                                                                                arginfo_getmyuid)
02860        PHP_FE(getmygid,                                                                                                arginfo_getmygid)
02861        PHP_FE(getmypid,                                                                                                arginfo_getmypid)
02862        PHP_FE(getmyinode,                                                                                              arginfo_getmyinode)
02863        PHP_FE(getlastmod,                                                                                              arginfo_getlastmod)
02864 
02865        PHP_FE(base64_decode,                                                                                           arginfo_base64_decode)
02866        PHP_FE(base64_encode,                                                                                           arginfo_base64_encode)
02867 
02868        PHP_FE(convert_uuencode,                                                                                 arginfo_convert_uuencode)
02869        PHP_FE(convert_uudecode,                                                                                 arginfo_convert_uudecode)
02870 
02871        PHP_FE(abs,                                                                                                            arginfo_abs)
02872        PHP_FE(ceil,                                                                                                    arginfo_ceil)
02873        PHP_FE(floor,                                                                                                   arginfo_floor)
02874        PHP_FE(round,                                                                                                   arginfo_round)
02875        PHP_FE(sin,                                                                                                            arginfo_sin)
02876        PHP_FE(cos,                                                                                                            arginfo_cos)
02877        PHP_FE(tan,                                                                                                            arginfo_tan)
02878        PHP_FE(asin,                                                                                                    arginfo_asin)
02879        PHP_FE(acos,                                                                                                    arginfo_acos)
02880        PHP_FE(atan,                                                                                                    arginfo_atan)
02881        PHP_FE(atanh,                                                                                                   arginfo_atanh)
02882        PHP_FE(atan2,                                                                                                   arginfo_atan2)
02883        PHP_FE(sinh,                                                                                                    arginfo_sinh)
02884        PHP_FE(cosh,                                                                                                    arginfo_cosh)
02885        PHP_FE(tanh,                                                                                                    arginfo_tanh)
02886        PHP_FE(asinh,                                                                                                   arginfo_asinh)
02887        PHP_FE(acosh,                                                                                                   arginfo_acosh)
02888        PHP_FE(expm1,                                                                                                   arginfo_expm1)
02889        PHP_FE(log1p,                                                                                                   arginfo_log1p)
02890        PHP_FE(pi,                                                                                                             arginfo_pi)
02891        PHP_FE(is_finite,                                                                                               arginfo_is_finite)
02892        PHP_FE(is_nan,                                                                                                         arginfo_is_nan)
02893        PHP_FE(is_infinite,                                                                                             arginfo_is_infinite)
02894        PHP_FE(pow,                                                                                                            arginfo_pow)
02895        PHP_FE(exp,                                                                                                            arginfo_exp)
02896        PHP_FE(log,                                                                                                            arginfo_log)
02897        PHP_FE(log10,                                                                                                   arginfo_log10)
02898        PHP_FE(sqrt,                                                                                                    arginfo_sqrt)
02899        PHP_FE(hypot,                                                                                                   arginfo_hypot)
02900        PHP_FE(deg2rad,                                                                                                        arginfo_deg2rad)
02901        PHP_FE(rad2deg,                                                                                                        arginfo_rad2deg)
02902        PHP_FE(bindec,                                                                                                         arginfo_bindec)
02903        PHP_FE(hexdec,                                                                                                         arginfo_hexdec)
02904        PHP_FE(octdec,                                                                                                         arginfo_octdec)
02905        PHP_FE(decbin,                                                                                                         arginfo_decbin)
02906        PHP_FE(decoct,                                                                                                         arginfo_decoct)
02907        PHP_FE(dechex,                                                                                                         arginfo_dechex)
02908        PHP_FE(base_convert,                                                                                     arginfo_base_convert)
02909        PHP_FE(number_format,                                                                                           arginfo_number_format)
02910        PHP_FE(fmod,                                                                                                    arginfo_fmod)
02911 #ifdef HAVE_INET_NTOP
02912        PHP_RAW_NAMED_FE(inet_ntop,        php_inet_ntop,                                                        arginfo_inet_ntop)
02913 #endif
02914 #ifdef HAVE_INET_PTON
02915        PHP_RAW_NAMED_FE(inet_pton,        php_inet_pton,                                                        arginfo_inet_pton)
02916 #endif
02917        PHP_FE(ip2long,                                                                                                        arginfo_ip2long)
02918        PHP_FE(long2ip,                                                                                                        arginfo_long2ip)
02919 
02920        PHP_FE(getenv,                                                                                                         arginfo_getenv)
02921 #ifdef HAVE_PUTENV
02922        PHP_FE(putenv,                                                                                                         arginfo_putenv)
02923 #endif
02924 
02925        PHP_FE(getopt,                                                                                                         arginfo_getopt)
02926 
02927 #ifdef HAVE_GETLOADAVG
02928        PHP_FE(sys_getloadavg,                                                                                          arginfo_sys_getloadavg)
02929 #endif
02930 #ifdef HAVE_GETTIMEOFDAY
02931        PHP_FE(microtime,                                                                                               arginfo_microtime)
02932        PHP_FE(gettimeofday,                                                                                     arginfo_gettimeofday)
02933 #endif
02934 
02935 #ifdef HAVE_GETRUSAGE
02936        PHP_FE(getrusage,                                                                                               arginfo_getrusage)
02937 #endif
02938 
02939 #ifdef HAVE_GETTIMEOFDAY
02940        PHP_FE(uniqid,                                                                                                         arginfo_uniqid)
02941 #endif
02942 
02943        PHP_FE(quoted_printable_decode,                                                                          arginfo_quoted_printable_decode)
02944        PHP_FE(quoted_printable_encode,                                                                          arginfo_quoted_printable_encode)
02945        PHP_FE(convert_cyr_string,                                                                               arginfo_convert_cyr_string)
02946        PHP_FE(get_current_user,                                                                                 arginfo_get_current_user)
02947        PHP_FE(set_time_limit,                                                                                          arginfo_set_time_limit)
02948        PHP_FE(get_cfg_var,                                                                                             arginfo_get_cfg_var)
02949 
02950        PHP_DEP_FALIAS(magic_quotes_runtime,      set_magic_quotes_runtime,          arginfo_set_magic_quotes_runtime)
02951        PHP_DEP_FE(set_magic_quotes_runtime,                                                              arginfo_set_magic_quotes_runtime)
02952        PHP_FE(get_magic_quotes_gpc,                                                                             arginfo_get_magic_quotes_gpc)
02953        PHP_FE(get_magic_quotes_runtime,                                                                  arginfo_get_magic_quotes_runtime)
02954 
02955        PHP_FE(import_request_variables,                                                                  arginfo_import_request_variables)
02956        PHP_FE(error_log,                                                                                               arginfo_error_log)
02957        PHP_FE(error_get_last,                                                                                          arginfo_error_get_last)
02958        PHP_FE(call_user_func,                                                                                          arginfo_call_user_func)
02959        PHP_FE(call_user_func_array,                                                                             arginfo_call_user_func_array)
02960        PHP_DEP_FE(call_user_method,                                                                             arginfo_call_user_method)
02961        PHP_DEP_FE(call_user_method_array,                                                                arginfo_call_user_method_array)
02962        PHP_FE(forward_static_call,                                                                       arginfo_forward_static_call)
02963        PHP_FE(forward_static_call_array,                                                                 arginfo_forward_static_call_array)
02964        PHP_FE(serialize,                                                                                               arginfo_serialize)
02965        PHP_FE(unserialize,                                                                                             arginfo_unserialize)
02966 
02967        PHP_FE(var_dump,                                                                                                arginfo_var_dump)
02968        PHP_FE(var_export,                                                                                              arginfo_var_export)
02969        PHP_FE(debug_zval_dump,                                                                                         arginfo_debug_zval_dump)
02970        PHP_FE(print_r,                                                                                                        arginfo_print_r)
02971        PHP_FE(memory_get_usage,                                                                                 arginfo_memory_get_usage)
02972        PHP_FE(memory_get_peak_usage,                                                                            arginfo_memory_get_peak_usage)
02973 
02974        PHP_FE(register_shutdown_function,                                                                arginfo_register_shutdown_function)
02975        PHP_FE(register_tick_function,                                                                           arginfo_register_tick_function)
02976        PHP_FE(unregister_tick_function,                                                                  arginfo_unregister_tick_function)
02977 
02978        PHP_FE(highlight_file,                                                                                          arginfo_highlight_file)
02979        PHP_FALIAS(show_source,                   highlight_file,                                                arginfo_highlight_file)
02980        PHP_FE(highlight_string,                                                                                 arginfo_highlight_string)
02981        PHP_FE(php_strip_whitespace,                                                                             arginfo_php_strip_whitespace)
02982 
02983        PHP_FE(ini_get,                                                                                                        arginfo_ini_get)
02984        PHP_FE(ini_get_all,                                                                                             arginfo_ini_get_all)
02985        PHP_FE(ini_set,                                                                                                        arginfo_ini_set)
02986        PHP_FALIAS(ini_alter,                     ini_set,                                                       arginfo_ini_set)
02987        PHP_FE(ini_restore,                                                                                             arginfo_ini_restore)
02988        PHP_FE(get_include_path,                                                                                 arginfo_get_include_path)
02989        PHP_FE(set_include_path,                                                                                 arginfo_set_include_path)
02990        PHP_FE(restore_include_path,                                                                             arginfo_restore_include_path)
02991 
02992        PHP_FE(setcookie,                                                                                               arginfo_setcookie)
02993        PHP_FE(setrawcookie,                                                                                     arginfo_setrawcookie)
02994        PHP_FE(header,                                                                                                         arginfo_header)
02995        PHP_FE(header_remove,                                                                                           arginfo_header_remove)
02996        PHP_FE(headers_sent,                                                                                     arginfo_headers_sent)
02997        PHP_FE(headers_list,                                                                                     arginfo_headers_list)
02998 
02999        PHP_FE(connection_aborted,                                                                               arginfo_connection_aborted)
03000        PHP_FE(connection_status,                                                                                arginfo_connection_status)
03001        PHP_FE(ignore_user_abort,                                                                                arginfo_ignore_user_abort)
03002        PHP_FE(parse_ini_file,                                                                                          arginfo_parse_ini_file)
03003        PHP_FE(parse_ini_string,                                                                                 arginfo_parse_ini_string)
03004 #if ZEND_DEBUG
03005        PHP_FE(config_get_hash,                                                                                         arginfo_config_get_hash)
03006 #endif
03007        PHP_FE(is_uploaded_file,                                                                                 arginfo_is_uploaded_file)
03008        PHP_FE(move_uploaded_file,                                                                               arginfo_move_uploaded_file)
03009 
03010        /* functions from dns.c */
03011        PHP_FE(gethostbyaddr,                                                                                           arginfo_gethostbyaddr)
03012        PHP_FE(gethostbyname,                                                                                           arginfo_gethostbyname)
03013        PHP_FE(gethostbynamel,                                                                                          arginfo_gethostbynamel)
03014 
03015 #ifdef HAVE_GETHOSTNAME
03016        PHP_FE(gethostname,                                                                                      arginfo_gethostname)
03017 #endif
03018 
03019 #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
03020 
03021        PHP_FE(dns_check_record,                                                                                 arginfo_dns_check_record)
03022        PHP_FALIAS(checkdnsrr,                    dns_check_record,                                       arginfo_dns_check_record)
03023 
03024 # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
03025        PHP_FE(dns_get_mx,                                                                                              arginfo_dns_get_mx)
03026        PHP_FALIAS(getmxrr,                       dns_get_mx,                               arginfo_dns_get_mx)
03027        PHP_FE(dns_get_record,                                                                                          arginfo_dns_get_record)
03028 # endif
03029 #endif
03030 
03031        /* functions from type.c */
03032        PHP_FE(intval,                                                                                                         arginfo_intval)
03033        PHP_FE(floatval,                                                                                                arginfo_floatval)
03034        PHP_FALIAS(doubleval,                     floatval,                                                      arginfo_floatval)
03035        PHP_FE(strval,                                                                                                         arginfo_strval)
03036        PHP_FE(gettype,                                                                                                        arginfo_gettype)
03037        PHP_FE(settype,                                                                                                        arginfo_settype)
03038        PHP_FE(is_null,                                                                                                        arginfo_is_null)
03039        PHP_FE(is_resource,                                                                                             arginfo_is_resource)
03040        PHP_FE(is_bool,                                                                                                        arginfo_is_bool)
03041        PHP_FE(is_long,                                                                                                        arginfo_is_long)
03042        PHP_FE(is_float,                                                                                                arginfo_is_float)
03043        PHP_FALIAS(is_int,                        is_long,                                                       arginfo_is_long)
03044        PHP_FALIAS(is_integer,                    is_long,                                                       arginfo_is_long)
03045        PHP_FALIAS(is_double,                     is_float,                                                      arginfo_is_float)
03046        PHP_FALIAS(is_real,                       is_float,                                                      arginfo_is_float)
03047        PHP_FE(is_numeric,                                                                                              arginfo_is_numeric)
03048        PHP_FE(is_string,                                                                                               arginfo_is_string)
03049        PHP_FE(is_array,                                                                                                arginfo_is_array)
03050        PHP_FE(is_object,                                                                                               arginfo_is_object)
03051        PHP_FE(is_scalar,                                                                                               arginfo_is_scalar)
03052        PHP_FE(is_callable,                                                                                             arginfo_is_callable)
03053 
03054        /* functions from file.c */
03055        PHP_FE(pclose,                                                                                                         arginfo_pclose)
03056        PHP_FE(popen,                                                                                                   arginfo_popen)
03057        PHP_FE(readfile,                                                                                                arginfo_readfile)
03058        PHP_FE(rewind,                                                                                                         arginfo_rewind)
03059        PHP_FE(rmdir,                                                                                                   arginfo_rmdir)
03060        PHP_FE(umask,                                                                                                   arginfo_umask)
03061        PHP_FE(fclose,                                                                                                         arginfo_fclose)
03062        PHP_FE(feof,                                                                                                    arginfo_feof)
03063        PHP_FE(fgetc,                                                                                                   arginfo_fgetc)
03064        PHP_FE(fgets,                                                                                                   arginfo_fgets)
03065        PHP_FE(fgetss,                                                                                                         arginfo_fgetss)
03066        PHP_FE(fread,                                                                                                   arginfo_fread)
03067        PHP_NAMED_FE(fopen,                       php_if_fopen,                                           arginfo_fopen)
03068        PHP_FE(fpassthru,                                                                                               arginfo_fpassthru)
03069        PHP_NAMED_FE(ftruncate,                   php_if_ftruncate,                                       arginfo_ftruncate)
03070        PHP_NAMED_FE(fstat,                       php_if_fstat,                                           arginfo_fstat)
03071        PHP_FE(fseek,                                                                                                   arginfo_fseek)
03072        PHP_FE(ftell,                                                                                                   arginfo_ftell)
03073        PHP_FE(fflush,                                                                                                         arginfo_fflush)
03074        PHP_FE(fwrite,                                                                                                         arginfo_fwrite)
03075        PHP_FALIAS(fputs,                         fwrite,                                                               arginfo_fwrite)
03076        PHP_FE(mkdir,                                                                                                   arginfo_mkdir)
03077        PHP_FE(rename,                                                                                                         arginfo_rename)
03078        PHP_FE(copy,                                                                                                    arginfo_copy)
03079        PHP_FE(tempnam,                                                                                                        arginfo_tempnam)
03080        PHP_NAMED_FE(tmpfile,                     php_if_tmpfile,                                                arginfo_tmpfile)
03081        PHP_FE(file,                                                                                                    arginfo_file)
03082        PHP_FE(file_get_contents,                                                                                arginfo_file_get_contents)
03083        PHP_FE(file_put_contents,                                                                                arginfo_file_put_contents)
03084        PHP_FE(stream_select,                                                                                           arginfo_stream_select)
03085        PHP_FE(stream_context_create,                                                                            arginfo_stream_context_create)
03086        PHP_FE(stream_context_set_params,                                                                 arginfo_stream_context_set_params)
03087        PHP_FE(stream_context_get_params,                                                                 arginfo_stream_context_get_params)
03088        PHP_FE(stream_context_set_option,                                                                 arginfo_stream_context_set_option)
03089        PHP_FE(stream_context_get_options,                                                                arginfo_stream_context_get_options)
03090        PHP_FE(stream_context_get_default,                                                                arginfo_stream_context_get_default)
03091        PHP_FE(stream_context_set_default,                                                                arginfo_stream_context_set_default)
03092        PHP_FE(stream_filter_prepend,                                                                            arginfo_stream_filter_prepend)
03093        PHP_FE(stream_filter_append,                                                                             arginfo_stream_filter_append)
03094        PHP_FE(stream_filter_remove,                                                                             arginfo_stream_filter_remove)
03095        PHP_FE(stream_socket_client,                                                                             arginfo_stream_socket_client)
03096        PHP_FE(stream_socket_server,                                                                             arginfo_stream_socket_server)
03097        PHP_FE(stream_socket_accept,                                                                             arginfo_stream_socket_accept)
03098        PHP_FE(stream_socket_get_name,                                                                           arginfo_stream_socket_get_name)
03099        PHP_FE(stream_socket_recvfrom,                                                                           arginfo_stream_socket_recvfrom)
03100        PHP_FE(stream_socket_sendto,                                                                             arginfo_stream_socket_sendto)
03101        PHP_FE(stream_socket_enable_crypto,                                                                      arginfo_stream_socket_enable_crypto)
03102 #ifdef HAVE_SHUTDOWN
03103        PHP_FE(stream_socket_shutdown,                                                                           arginfo_stream_socket_shutdown)
03104 #endif
03105 #if HAVE_SOCKETPAIR
03106        PHP_FE(stream_socket_pair,                                                                               arginfo_stream_socket_pair)
03107 #endif
03108        PHP_FE(stream_copy_to_stream,                                                                            arginfo_stream_copy_to_stream)
03109        PHP_FE(stream_get_contents,                                                                              arginfo_stream_get_contents)
03110        PHP_FE(stream_supports_lock,                                                                             arginfo_stream_supports_lock)
03111        PHP_FE(fgetcsv,                                                                                                        arginfo_fgetcsv)
03112        PHP_FE(fputcsv,                                                                                                        arginfo_fputcsv)
03113        PHP_FE(flock,                                                                                                   arginfo_flock)
03114        PHP_FE(get_meta_tags,                                                                                           arginfo_get_meta_tags)
03115        PHP_FE(stream_set_read_buffer,                                                                           arginfo_stream_set_read_buffer)
03116        PHP_FE(stream_set_write_buffer,                                                                          arginfo_stream_set_write_buffer)
03117        PHP_FALIAS(set_file_buffer, stream_set_write_buffer,                                arginfo_stream_set_write_buffer)
03118 
03119        PHP_DEP_FALIAS(set_socket_blocking, stream_set_blocking,                            arginfo_stream_set_blocking)
03120        PHP_FE(stream_set_blocking,                                                                              arginfo_stream_set_blocking)
03121        PHP_FALIAS(socket_set_blocking, stream_set_blocking,                                arginfo_stream_set_blocking)
03122 
03123        PHP_FE(stream_get_meta_data,                                                                             arginfo_stream_get_meta_data)
03124        PHP_FE(stream_get_line,                                                                                         arginfo_stream_get_line)
03125        PHP_FE(stream_wrapper_register,                                                                          arginfo_stream_wrapper_register)
03126        PHP_FALIAS(stream_register_wrapper, stream_wrapper_register,                 arginfo_stream_wrapper_register)
03127        PHP_FE(stream_wrapper_unregister,                                                                 arginfo_stream_wrapper_unregister)
03128        PHP_FE(stream_wrapper_restore,                                                                           arginfo_stream_wrapper_restore)
03129        PHP_FE(stream_get_wrappers,                                                                              arginfo_stream_get_wrappers)
03130        PHP_FE(stream_get_transports,                                                                            arginfo_stream_get_transports)
03131        PHP_FE(stream_resolve_include_path,                                                                      arginfo_stream_resolve_include_path)
03132        PHP_FE(stream_is_local,                                                                                  arginfo_stream_is_local)
03133        PHP_FE(get_headers,                                                                                             arginfo_get_headers)
03134 
03135 #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
03136        PHP_FE(stream_set_timeout,                                                                               arginfo_stream_set_timeout)
03137        PHP_FALIAS(socket_set_timeout, stream_set_timeout,                                         arginfo_stream_set_timeout)
03138 #endif
03139 
03140        PHP_FALIAS(socket_get_status, stream_get_meta_data,                                        arginfo_stream_get_meta_data)
03141 
03142 #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
03143        PHP_FE(realpath,                                                                                                arginfo_realpath)
03144 #endif
03145 
03146 #ifdef HAVE_FNMATCH
03147        PHP_FE(fnmatch,                                                                                                        arginfo_fnmatch)
03148 #endif
03149 
03150        /* functions from fsock.c */
03151        PHP_FE(fsockopen,                                                                                               arginfo_fsockopen)
03152        PHP_FE(pfsockopen,                                                                                              arginfo_pfsockopen)
03153 
03154        /* functions from pack.c */
03155        PHP_FE(pack,                                                                                                    arginfo_pack)
03156        PHP_FE(unpack,                                                                                                         arginfo_unpack)
03157 
03158        /* functions from browscap.c */
03159        PHP_FE(get_browser,                                                                                             arginfo_get_browser)
03160 
03161 #if HAVE_CRYPT
03162        /* functions from crypt.c */
03163        PHP_FE(crypt,                                                                                                   arginfo_crypt)
03164 #endif
03165 
03166        /* functions from dir.c */
03167        PHP_FE(opendir,                                                                                                        arginfo_opendir)
03168        PHP_FE(closedir,                                                                                                arginfo_closedir)
03169        PHP_FE(chdir,                                                                                                   arginfo_chdir)
03170 
03171 #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
03172        PHP_FE(chroot,                                                                                                         arginfo_chroot)
03173 #endif
03174 
03175        PHP_FE(getcwd,                                                                                                         arginfo_getcwd)
03176        PHP_FE(rewinddir,                                                                                               arginfo_rewinddir)
03177        PHP_NAMED_FE(readdir,                     php_if_readdir,                                                arginfo_readdir)
03178        PHP_FALIAS(dir,                                  getdir,                                                               arginfo_dir)
03179        PHP_FE(scandir,                                                                                                        arginfo_scandir)
03180 #ifdef HAVE_GLOB
03181        PHP_FE(glob,                                                                                                    arginfo_glob)
03182 #endif
03183        /* functions from filestat.c */
03184        PHP_FE(fileatime,                                                                                               arginfo_fileatime)
03185        PHP_FE(filectime,                                                                                               arginfo_filectime)
03186        PHP_FE(filegroup,                                                                                               arginfo_filegroup)
03187        PHP_FE(fileinode,                                                                                               arginfo_fileinode)
03188        PHP_FE(filemtime,                                                                                               arginfo_filemtime)
03189        PHP_FE(fileowner,                                                                                               arginfo_fileowner)
03190        PHP_FE(fileperms,                                                                                               arginfo_fileperms)
03191        PHP_FE(filesize,                                                                                                arginfo_filesize)
03192        PHP_FE(filetype,                                                                                                arginfo_filetype)
03193        PHP_FE(file_exists,                                                                                             arginfo_file_exists)
03194        PHP_FE(is_writable,                                                                                             arginfo_is_writable)
03195        PHP_FALIAS(is_writeable,           is_writable,                                            arginfo_is_writable)
03196        PHP_FE(is_readable,                                                                                             arginfo_is_readable)
03197        PHP_FE(is_executable,                                                                                           arginfo_is_executable)
03198        PHP_FE(is_file,                                                                                                        arginfo_is_file)
03199        PHP_FE(is_dir,                                                                                                         arginfo_is_dir)
03200        PHP_FE(is_link,                                                                                                        arginfo_is_link)
03201        PHP_NAMED_FE(stat,                        php_if_stat,                                            arginfo_stat)
03202        PHP_NAMED_FE(lstat,                       php_if_lstat,                                           arginfo_lstat)
03203 #ifndef NETWARE
03204        PHP_FE(chown,                                                                                                   arginfo_chown)
03205        PHP_FE(chgrp,                                                                                                   arginfo_chgrp)
03206 #endif
03207 #if HAVE_LCHOWN
03208        PHP_FE(lchown,                                                                                                         arginfo_lchown)
03209 #endif
03210 #if HAVE_LCHOWN
03211        PHP_FE(lchgrp,                                                                                                         arginfo_lchgrp)
03212 #endif
03213        PHP_FE(chmod,                                                                                                   arginfo_chmod)
03214 #if HAVE_UTIME
03215        PHP_FE(touch,                                                                                                   arginfo_touch)
03216 #endif
03217        PHP_FE(clearstatcache,                                                                                          arginfo_clearstatcache)
03218        PHP_FE(disk_total_space,                                                                                 arginfo_disk_total_space)
03219        PHP_FE(disk_free_space,                                                                                         arginfo_disk_free_space)
03220        PHP_FALIAS(diskfreespace,          disk_free_space,                                        arginfo_disk_free_space)
03221        PHP_FE(realpath_cache_size,                                                                              arginfo_realpath_cache_size)
03222        PHP_FE(realpath_cache_get,                                                                               arginfo_realpath_cache_get)
03223 
03224        /* functions from mail.c */
03225        PHP_FE(mail,                                                                                                    arginfo_mail)
03226        PHP_FE(ezmlm_hash,                                                                                              arginfo_ezmlm_hash)
03227 
03228        /* functions from syslog.c */
03229 #ifdef HAVE_SYSLOG_H
03230        PHP_FE(openlog,                                                                                                        arginfo_openlog)
03231        PHP_FE(syslog,                                                                                                         arginfo_syslog)
03232        PHP_FE(closelog,                                                                                                arginfo_closelog)
03233        PHP_DEP_FE(define_syslog_variables,                                                                             arginfo_define_syslog_variables)
03234 #endif
03235 
03236        /* functions from lcg.c */
03237        PHP_FE(lcg_value,                                                                                               arginfo_lcg_value)
03238 
03239        /* functions from metaphone.c */
03240        PHP_FE(metaphone,                                                                                               arginfo_metaphone)
03241 
03242        /* functions from output.c */
03243        PHP_FE(ob_start,                                                                                                arginfo_ob_start)
03244        PHP_FE(ob_flush,                                                                                                arginfo_ob_flush)
03245        PHP_FE(ob_clean,                                                                                                arginfo_ob_clean)
03246        PHP_FE(ob_end_flush,                                                                                     arginfo_ob_end_flush)
03247        PHP_FE(ob_end_clean,                                                                                     arginfo_ob_end_clean)
03248        PHP_FE(ob_get_flush,                                                                                     arginfo_ob_get_flush)
03249        PHP_FE(ob_get_clean,                                                                                     arginfo_ob_get_clean)
03250        PHP_FE(ob_get_length,                                                                                           arginfo_ob_get_length)
03251        PHP_FE(ob_get_level,                                                                                     arginfo_ob_get_level)
03252        PHP_FE(ob_get_status,                                                                                           arginfo_ob_get_status)
03253        PHP_FE(ob_get_contents,                                                                                         arginfo_ob_get_contents)
03254        PHP_FE(ob_implicit_flush,                                                                                arginfo_ob_implicit_flush)
03255        PHP_FE(ob_list_handlers,                                                                                 arginfo_ob_list_handlers)
03256 
03257        /* functions from array.c */
03258        PHP_FE(ksort,                                                                                                   arginfo_ksort)
03259        PHP_FE(krsort,                                                                                                         arginfo_krsort)
03260        PHP_FE(natsort,                                                                                                        arginfo_natsort)
03261        PHP_FE(natcasesort,                                                                                             arginfo_natcasesort)
03262        PHP_FE(asort,                                                                                                   arginfo_asort)
03263        PHP_FE(arsort,                                                                                                         arginfo_arsort)
03264        PHP_FE(sort,                                                                                                    arginfo_sort)
03265        PHP_FE(rsort,                                                                                                   arginfo_rsort)
03266        PHP_FE(usort,                                                                                                   arginfo_usort)
03267        PHP_FE(uasort,                                                                                                         arginfo_uasort)
03268        PHP_FE(uksort,                                                                                                         arginfo_uksort)
03269        PHP_FE(shuffle,                                                                                                        arginfo_shuffle)
03270        PHP_FE(array_walk,                                                                                              arginfo_array_walk)
03271        PHP_FE(array_walk_recursive,                                                                             arginfo_array_walk_recursive)
03272        PHP_FE(count,                                                                                                   arginfo_count)
03273        PHP_FE(end,                                                                                                            arginfo_end)
03274        PHP_FE(prev,                                                                                                    arginfo_prev)
03275        PHP_FE(next,                                                                                                    arginfo_next)
03276        PHP_FE(reset,                                                                                                   arginfo_reset)
03277        PHP_FE(current,                                                                                                        arginfo_current)
03278        PHP_FE(key,                                                                                                            arginfo_key)
03279        PHP_FE(min,                                                                                                            arginfo_min)
03280        PHP_FE(max,                                                                                                            arginfo_max)
03281        PHP_FE(in_array,                                                                                                arginfo_in_array)
03282        PHP_FE(array_search,                                                                                     arginfo_array_search)
03283        PHP_FE(extract,                                                                                                        arginfo_extract)
03284        PHP_FE(compact,                                                                                                        arginfo_compact)
03285        PHP_FE(array_fill,                                                                                              arginfo_array_fill)
03286        PHP_FE(array_fill_keys,                                                                                         arginfo_array_fill_keys)
03287        PHP_FE(range,                                                                                                   arginfo_range)
03288        PHP_FE(array_multisort,                                                                                         arginfo_array_multisort)
03289        PHP_FE(array_push,                                                                                              arginfo_array_push)
03290        PHP_FE(array_pop,                                                                                               arginfo_array_pop)
03291        PHP_FE(array_shift,                                                                                             arginfo_array_shift)
03292        PHP_FE(array_unshift,                                                                                           arginfo_array_unshift)
03293        PHP_FE(array_splice,                                                                                     arginfo_array_splice)
03294        PHP_FE(array_slice,                                                                                             arginfo_array_slice)
03295        PHP_FE(array_merge,                                                                                             arginfo_array_merge)
03296        PHP_FE(array_merge_recursive,                                                                            arginfo_array_merge_recursive)
03297        PHP_FE(array_replace,                                                                                           arginfo_array_replace)
03298        PHP_FE(array_replace_recursive,                                                                          arginfo_array_replace_recursive)
03299        PHP_FE(array_keys,                                                                                              arginfo_array_keys)
03300        PHP_FE(array_values,                                                                                     arginfo_array_values)
03301        PHP_FE(array_count_values,                                                                               arginfo_array_count_values)
03302        PHP_FE(array_reverse,                                                                                           arginfo_array_reverse)
03303        PHP_FE(array_reduce,                                                                                     arginfo_array_reduce)
03304        PHP_FE(array_pad,                                                                                               arginfo_array_pad)
03305        PHP_FE(array_flip,                                                                                              arginfo_array_flip)
03306        PHP_FE(array_change_key_case,                                                                            arginfo_array_change_key_case)
03307        PHP_FE(array_rand,                                                                                              arginfo_array_rand)
03308        PHP_FE(array_unique,                                                                                     arginfo_array_unique)
03309        PHP_FE(array_intersect,                                                                                         arginfo_array_intersect)
03310        PHP_FE(array_intersect_key,                                                                              arginfo_array_intersect_key)
03311        PHP_FE(array_intersect_ukey,                                                                             arginfo_array_intersect_ukey)
03312        PHP_FE(array_uintersect,                                                                                 arginfo_array_uintersect)
03313        PHP_FE(array_intersect_assoc,                                                                            arginfo_array_intersect_assoc)
03314        PHP_FE(array_uintersect_assoc,                                                                           arginfo_array_uintersect_assoc)
03315        PHP_FE(array_intersect_uassoc,                                                                           arginfo_array_intersect_uassoc)
03316        PHP_FE(array_uintersect_uassoc,                                                                          arginfo_array_uintersect_uassoc)
03317        PHP_FE(array_diff,                                                                                              arginfo_array_diff)
03318        PHP_FE(array_diff_key,                                                                                          arginfo_array_diff_key)
03319        PHP_FE(array_diff_ukey,                                                                                         arginfo_array_diff_ukey)
03320        PHP_FE(array_udiff,                                                                                             arginfo_array_udiff)
03321        PHP_FE(array_diff_assoc,                                                                                 arginfo_array_diff_assoc)
03322        PHP_FE(array_udiff_assoc,                                                                                arginfo_array_udiff_assoc)
03323        PHP_FE(array_diff_uassoc,                                                                                arginfo_array_diff_uassoc)
03324        PHP_FE(array_udiff_uassoc,                                                                               arginfo_array_udiff_uassoc)
03325        PHP_FE(array_sum,                                                                                               arginfo_array_sum)
03326        PHP_FE(array_product,                                                                                           arginfo_array_product)
03327        PHP_FE(array_filter,                                                                                     arginfo_array_filter)
03328        PHP_FE(array_map,                                                                                               arginfo_array_map)
03329        PHP_FE(array_chunk,                                                                                             arginfo_array_chunk)
03330        PHP_FE(array_combine,                                                                                           arginfo_array_combine)
03331        PHP_FE(array_key_exists,                                                                                 arginfo_array_key_exists)
03332 
03333        /* aliases from array.c */
03334        PHP_FALIAS(pos,                                  current,                                                       arginfo_current)
03335        PHP_FALIAS(sizeof,                        count,                                                         arginfo_count)
03336        PHP_FALIAS(key_exists,                    array_key_exists,                                       arginfo_array_key_exists)
03337 
03338        /* functions from assert.c */
03339        PHP_FE(assert,                                                                                                         arginfo_assert)
03340        PHP_FE(assert_options,                                                                                          arginfo_assert_options)
03341 
03342        /* functions from versioning.c */
03343        PHP_FE(version_compare,                                                                                         arginfo_version_compare)
03344 
03345        /* functions from ftok.c*/
03346 #if HAVE_FTOK
03347        PHP_FE(ftok,                                                                                                    arginfo_ftok)
03348 #endif
03349 
03350        PHP_FE(str_rot13,                                                                                               arginfo_str_rot13)
03351        PHP_FE(stream_get_filters,                                                                               arginfo_stream_get_filters)
03352        PHP_FE(stream_filter_register,                                                                           arginfo_stream_filter_register)
03353        PHP_FE(stream_bucket_make_writeable,                                                              arginfo_stream_bucket_make_writeable)
03354        PHP_FE(stream_bucket_prepend,                                                                            arginfo_stream_bucket_prepend)
03355        PHP_FE(stream_bucket_append,                                                                             arginfo_stream_bucket_append)
03356        PHP_FE(stream_bucket_new,                                                                                arginfo_stream_bucket_new)
03357 
03358        PHP_FE(output_add_rewrite_var,                                                                           arginfo_output_add_rewrite_var)
03359        PHP_FE(output_reset_rewrite_vars,                                                                 arginfo_output_reset_rewrite_vars)
03360 
03361        PHP_FE(sys_get_temp_dir,                                                                                 arginfo_sys_get_temp_dir)
03362 
03363        PHP_FE_END
03364 };
03365 /* }}} */
03366 
03367 static PHP_INI_MH(OnUpdateSafeModeProtectedEnvVars) /* {{{ */
03368 {
03369        char *protected_vars, *protected_var;
03370        char *token_buf;
03371        int dummy = 1;
03372 
03373        protected_vars = estrndup(new_value, new_value_length);
03374        zend_hash_clean(&BG(sm_protected_env_vars));
03375 
03376        protected_var = php_strtok_r(protected_vars, ", ", &token_buf);
03377        while (protected_var) {
03378               zend_hash_update(&BG(sm_protected_env_vars), protected_var, strlen(protected_var), &dummy, sizeof(int), NULL);
03379               protected_var = php_strtok_r(NULL, ", ", &token_buf);
03380        }
03381        efree(protected_vars);
03382        return SUCCESS;
03383 }
03384 /* }}} */
03385 
03386 static PHP_INI_MH(OnUpdateSafeModeAllowedEnvVars) /* {{{ */
03387 {
03388        if (BG(sm_allowed_env_vars)) {
03389               free(BG(sm_allowed_env_vars));
03390        }
03391        BG(sm_allowed_env_vars) = zend_strndup(new_value, new_value_length);
03392        return SUCCESS;
03393 }
03394 /* }}} */
03395 
03396 PHP_INI_BEGIN() /* {{{ */
03397        PHP_INI_ENTRY_EX("safe_mode_protected_env_vars", SAFE_MODE_PROTECTED_ENV_VARS, PHP_INI_SYSTEM, OnUpdateSafeModeProtectedEnvVars, NULL)
03398        PHP_INI_ENTRY_EX("safe_mode_allowed_env_vars",   SAFE_MODE_ALLOWED_ENV_VARS,   PHP_INI_SYSTEM, OnUpdateSafeModeAllowedEnvVars,   NULL)
03399 PHP_INI_END()
03400 /* }}} */
03401 
03402 static const zend_module_dep standard_deps[] = { /* {{{ */
03403        ZEND_MOD_OPTIONAL("session")
03404        ZEND_MOD_END
03405 };
03406 /* }}} */
03407 
03408 zend_module_entry basic_functions_module = { /* {{{ */
03409        STANDARD_MODULE_HEADER_EX,
03410        NULL,
03411        standard_deps,
03412        "standard",                               /* extension name */
03413        basic_functions,                   /* function list */
03414        PHP_MINIT(basic),                  /* process startup */
03415        PHP_MSHUTDOWN(basic),              /* process shutdown */
03416        PHP_RINIT(basic),                  /* request startup */
03417        PHP_RSHUTDOWN(basic),              /* request shutdown */
03418        PHP_MINFO(basic),                  /* extension info */
03419        PHP_VERSION,                       /* extension version */
03420        STANDARD_MODULE_PROPERTIES
03421 };
03422 /* }}} */
03423 
03424 #if defined(HAVE_PUTENV)
03425 static void php_putenv_destructor(putenv_entry *pe) /* {{{ */
03426 {
03427        if (pe->previous_value) {
03428 #if _MSC_VER >= 1300
03429               /* VS.Net has a bug in putenv() when setting a variable that
03430                * is already set; if the SetEnvironmentVariable() API call
03431                * fails, the Crt will double free() a string.
03432                * We try to avoid this by setting our own value first */
03433               SetEnvironmentVariable(pe->key, "bugbug");
03434 #endif
03435               putenv(pe->previous_value);
03436 # if defined(PHP_WIN32)
03437               efree(pe->previous_value);
03438 # endif
03439        } else {
03440 # if HAVE_UNSETENV
03441               unsetenv(pe->key);
03442 # elif defined(PHP_WIN32)
03443               SetEnvironmentVariable(pe->key, NULL);
03444 # else
03445               char **env;
03446 
03447               for (env = environ; env != NULL && *env != NULL; env++) {
03448                      if (!strncmp(*env, pe->key, pe->key_len) && (*env)[pe->key_len] == '=') {    /* found it */
03449                             *env = "";
03450                             break;
03451                      }
03452               }
03453 # endif
03454        }
03455 #ifdef HAVE_TZSET
03456        /* don't forget to reset the various libc globals that
03457         * we might have changed by an earlier call to tzset(). */
03458        if (!strncmp(pe->key, "TZ", pe->key_len)) {
03459               tzset();
03460        }
03461 #endif
03462 
03463        efree(pe->putenv_string);
03464        efree(pe->key);
03465 }
03466 /* }}} */
03467 #endif
03468 
03469 static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */
03470 {
03471        BG(rand_is_seeded) = 0;
03472        BG(mt_rand_is_seeded) = 0;
03473        BG(umask) = -1;
03474        BG(next) = NULL;
03475        BG(left) = -1;
03476        BG(user_tick_functions) = NULL;
03477        BG(user_filter_map) = NULL;
03478        zend_hash_init(&BG(sm_protected_env_vars), 5, NULL, NULL, 1);
03479        BG(sm_allowed_env_vars) = NULL;
03480 
03481        memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex)));
03482 
03483 #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
03484        memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
03485 #endif
03486 
03487        BG(incomplete_class) = incomplete_class_entry;
03488        BG(page_uid) = -1;
03489        BG(page_gid) = -1;
03490 }
03491 /* }}} */
03492 
03493 static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */
03494 {
03495        zend_hash_destroy(&BG(sm_protected_env_vars));
03496        if (BG(sm_allowed_env_vars)) {
03497               free(BG(sm_allowed_env_vars));
03498        }
03499        if (BG(url_adapt_state_ex).tags) {
03500               zend_hash_destroy(BG(url_adapt_state_ex).tags);
03501               free(BG(url_adapt_state_ex).tags);
03502        }
03503 }
03504 /* }}} */
03505 
03506 #define PHP_DOUBLE_INFINITY_HIGH       0x7ff00000
03507 #define PHP_DOUBLE_QUIET_NAN_HIGH      0xfff80000
03508 
03509 PHPAPI double php_get_nan(void) /* {{{ */
03510 {
03511 #if HAVE_HUGE_VAL_NAN
03512        return HUGE_VAL + -HUGE_VAL;
03513 #elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
03514        double val = 0.0;
03515        ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
03516        ((php_uint32*)&val)[0] = 0;
03517        return val;
03518 #elif HAVE_ATOF_ACCEPTS_NAN
03519        return atof("NAN");
03520 #else
03521        return 0.0/0.0;
03522 #endif
03523 }
03524 /* }}} */
03525 
03526 PHPAPI double php_get_inf(void) /* {{{ */
03527 {
03528 #if HAVE_HUGE_VAL_INF
03529        return HUGE_VAL;
03530 #elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
03531        double val = 0.0;
03532        ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
03533        ((php_uint32*)&val)[0] = 0;
03534        return val;
03535 #elif HAVE_ATOF_ACCEPTS_INF
03536        return atof("INF");
03537 #else
03538        return 1.0/0.0;
03539 #endif
03540 }
03541 /* }}} */
03542 
03543 PHP_MINIT_FUNCTION(basic) /* {{{ */
03544 {
03545 #ifdef ZTS
03546        ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
03547 #ifdef PHP_WIN32
03548        ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_globals_ctor, (ts_allocate_dtor)php_win32_core_globals_dtor );
03549 #endif
03550 #else
03551        basic_globals_ctor(&basic_globals TSRMLS_CC);
03552 #ifdef PHP_WIN32
03553        php_win32_core_globals_ctor(&the_php_win32_core_globals TSRMLS_CC);
03554 #endif
03555 #endif
03556 
03557        BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(TSRMLS_C);
03558 
03559        REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT);
03560        REGISTER_LONG_CONSTANT("CONNECTION_NORMAL",  PHP_CONNECTION_NORMAL,  CONST_CS | CONST_PERSISTENT);
03561        REGISTER_LONG_CONSTANT("CONNECTION_TIMEOUT", PHP_CONNECTION_TIMEOUT, CONST_CS | CONST_PERSISTENT);
03562 
03563        REGISTER_LONG_CONSTANT("INI_USER",   ZEND_INI_USER,   CONST_CS | CONST_PERSISTENT);
03564        REGISTER_LONG_CONSTANT("INI_PERDIR", ZEND_INI_PERDIR, CONST_CS | CONST_PERSISTENT);
03565        REGISTER_LONG_CONSTANT("INI_SYSTEM", ZEND_INI_SYSTEM, CONST_CS | CONST_PERSISTENT);
03566        REGISTER_LONG_CONSTANT("INI_ALL",    ZEND_INI_ALL,    CONST_CS | CONST_PERSISTENT);
03567 
03568        REGISTER_LONG_CONSTANT("INI_SCANNER_NORMAL", ZEND_INI_SCANNER_NORMAL, CONST_CS | CONST_PERSISTENT);
03569        REGISTER_LONG_CONSTANT("INI_SCANNER_RAW",    ZEND_INI_SCANNER_RAW,    CONST_CS | CONST_PERSISTENT);
03570 
03571        REGISTER_LONG_CONSTANT("PHP_URL_SCHEME", PHP_URL_SCHEME, CONST_CS | CONST_PERSISTENT);
03572        REGISTER_LONG_CONSTANT("PHP_URL_HOST", PHP_URL_HOST, CONST_CS | CONST_PERSISTENT);
03573        REGISTER_LONG_CONSTANT("PHP_URL_PORT", PHP_URL_PORT, CONST_CS | CONST_PERSISTENT);
03574        REGISTER_LONG_CONSTANT("PHP_URL_USER", PHP_URL_USER, CONST_CS | CONST_PERSISTENT);
03575        REGISTER_LONG_CONSTANT("PHP_URL_PASS", PHP_URL_PASS, CONST_CS | CONST_PERSISTENT);
03576        REGISTER_LONG_CONSTANT("PHP_URL_PATH", PHP_URL_PATH, CONST_CS | CONST_PERSISTENT);
03577        REGISTER_LONG_CONSTANT("PHP_URL_QUERY", PHP_URL_QUERY, CONST_CS | CONST_PERSISTENT);
03578        REGISTER_LONG_CONSTANT("PHP_URL_FRAGMENT", PHP_URL_FRAGMENT, CONST_CS | CONST_PERSISTENT);
03579 
03580 #define REGISTER_MATH_CONSTANT(x)  REGISTER_DOUBLE_CONSTANT(#x, x, CONST_CS | CONST_PERSISTENT)
03581        REGISTER_MATH_CONSTANT(M_E);
03582        REGISTER_MATH_CONSTANT(M_LOG2E);
03583        REGISTER_MATH_CONSTANT(M_LOG10E);
03584        REGISTER_MATH_CONSTANT(M_LN2);
03585        REGISTER_MATH_CONSTANT(M_LN10);
03586        REGISTER_MATH_CONSTANT(M_PI);
03587        REGISTER_MATH_CONSTANT(M_PI_2);
03588        REGISTER_MATH_CONSTANT(M_PI_4);
03589        REGISTER_MATH_CONSTANT(M_1_PI);
03590        REGISTER_MATH_CONSTANT(M_2_PI);
03591        REGISTER_MATH_CONSTANT(M_SQRTPI);
03592        REGISTER_MATH_CONSTANT(M_2_SQRTPI);
03593        REGISTER_MATH_CONSTANT(M_LNPI);
03594        REGISTER_MATH_CONSTANT(M_EULER);
03595        REGISTER_MATH_CONSTANT(M_SQRT2);
03596        REGISTER_MATH_CONSTANT(M_SQRT1_2);
03597        REGISTER_MATH_CONSTANT(M_SQRT3);
03598        REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | CONST_PERSISTENT);
03599        REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | CONST_PERSISTENT);
03600 
03601        REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS | CONST_PERSISTENT);
03602        REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, CONST_CS | CONST_PERSISTENT);
03603        REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_EVEN", PHP_ROUND_HALF_EVEN, CONST_CS | CONST_PERSISTENT);
03604        REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_ODD", PHP_ROUND_HALF_ODD, CONST_CS | CONST_PERSISTENT);
03605 
03606 #if ENABLE_TEST_CLASS
03607        test_class_startup();
03608 #endif
03609 
03610        REGISTER_INI_ENTRIES();
03611 
03612        register_phpinfo_constants(INIT_FUNC_ARGS_PASSTHRU);
03613        register_html_constants(INIT_FUNC_ARGS_PASSTHRU);
03614        register_string_constants(INIT_FUNC_ARGS_PASSTHRU);
03615 
03616        PHP_MINIT(file)(INIT_FUNC_ARGS_PASSTHRU);
03617        PHP_MINIT(pack)(INIT_FUNC_ARGS_PASSTHRU);
03618        PHP_MINIT(browscap)(INIT_FUNC_ARGS_PASSTHRU);
03619        PHP_MINIT(standard_filters)(INIT_FUNC_ARGS_PASSTHRU);
03620        PHP_MINIT(user_filters)(INIT_FUNC_ARGS_PASSTHRU);
03621 
03622 #if defined(HAVE_LOCALECONV) && defined(ZTS)
03623        PHP_MINIT(localeconv)(INIT_FUNC_ARGS_PASSTHRU);
03624 #endif
03625 
03626 #if defined(HAVE_NL_LANGINFO)
03627        PHP_MINIT(nl_langinfo)(INIT_FUNC_ARGS_PASSTHRU);
03628 #endif
03629 
03630 #if HAVE_CRYPT
03631        PHP_MINIT(crypt)(INIT_FUNC_ARGS_PASSTHRU);
03632 #endif
03633 
03634        PHP_MINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU);
03635 
03636        PHP_MINIT(dir)(INIT_FUNC_ARGS_PASSTHRU);
03637 #ifdef HAVE_SYSLOG_H
03638        PHP_MINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU);
03639 #endif
03640        PHP_MINIT(array)(INIT_FUNC_ARGS_PASSTHRU);
03641        PHP_MINIT(assert)(INIT_FUNC_ARGS_PASSTHRU);
03642        PHP_MINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU);
03643 #ifdef PHP_CAN_SUPPORT_PROC_OPEN
03644        PHP_MINIT(proc_open)(INIT_FUNC_ARGS_PASSTHRU);
03645 #endif
03646 
03647        PHP_MINIT(user_streams)(INIT_FUNC_ARGS_PASSTHRU);
03648        PHP_MINIT(imagetypes)(INIT_FUNC_ARGS_PASSTHRU);
03649 
03650        php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC);
03651        php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC);
03652 #ifdef HAVE_GLOB
03653        php_register_url_stream_wrapper("glob", &php_glob_stream_wrapper TSRMLS_CC);
03654 #endif
03655        php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
03656 #ifndef PHP_CURL_URL_WRAPPERS
03657        php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
03658        php_register_url_stream_wrapper("ftp", &php_stream_ftp_wrapper TSRMLS_CC);
03659 #endif
03660 
03661 #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
03662 # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
03663        PHP_MINIT(dns)(INIT_FUNC_ARGS_PASSTHRU);
03664 # endif
03665 #endif
03666 
03667        return SUCCESS;
03668 }
03669 /* }}} */
03670 
03671 PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
03672 {
03673 #ifdef HAVE_SYSLOG_H
03674        PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03675 #endif
03676 #ifdef ZTS
03677        ts_free_id(basic_globals_id);
03678 #ifdef PHP_WIN32
03679        ts_free_id(php_win32_core_globals_id);
03680 #endif
03681 #else
03682        basic_globals_dtor(&basic_globals TSRMLS_CC);
03683 #ifdef PHP_WIN32
03684        php_win32_core_globals_dtor(&the_php_win32_core_globals TSRMLS_CC);
03685 #endif
03686 #endif
03687 
03688        php_unregister_url_stream_wrapper("php" TSRMLS_CC);
03689 #ifndef PHP_CURL_URL_WRAPPERS
03690        php_unregister_url_stream_wrapper("http" TSRMLS_CC);
03691        php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
03692 #endif
03693 
03694        UNREGISTER_INI_ENTRIES();
03695 
03696        PHP_MSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03697        PHP_MSHUTDOWN(array)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03698        PHP_MSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03699        PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03700        PHP_MSHUTDOWN(file)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03701        PHP_MSHUTDOWN(standard_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03702 #if defined(HAVE_LOCALECONV) && defined(ZTS)
03703        PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03704 #endif
03705 #if HAVE_CRYPT
03706        PHP_MSHUTDOWN(crypt)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03707 #endif
03708 
03709        return SUCCESS;
03710 }
03711 /* }}} */
03712 
03713 PHP_RINIT_FUNCTION(basic) /* {{{ */
03714 {
03715        memset(BG(strtok_table), 0, 256);
03716        BG(strtok_string) = NULL;
03717        BG(strtok_zval) = NULL;
03718        BG(strtok_last) = NULL;
03719        BG(locale_string) = NULL;
03720        BG(array_walk_fci) = empty_fcall_info;
03721        BG(array_walk_fci_cache) = empty_fcall_info_cache;
03722        BG(user_compare_fci) = empty_fcall_info;
03723        BG(user_compare_fci_cache) = empty_fcall_info_cache;
03724        BG(page_uid) = -1;
03725        BG(page_gid) = -1;
03726        BG(page_inode) = -1;
03727        BG(page_mtime) = -1;
03728 #ifdef HAVE_PUTENV
03729        if (zend_hash_init(&BG(putenv_ht), 1, NULL, (void (*)(void *)) php_putenv_destructor, 0) == FAILURE) {
03730               return FAILURE;
03731        }
03732 #endif
03733        BG(user_shutdown_function_names) = NULL;
03734 
03735        PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
03736 #ifdef HAVE_SYSLOG_H
03737        PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU);
03738 #endif
03739        PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU);
03740        PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU);
03741 
03742        /* Reset magic_quotes_runtime */
03743        PG(magic_quotes_runtime) = INI_BOOL("magic_quotes_runtime");
03744 
03745        /* Setup default context */
03746        FG(default_context) = NULL;
03747 
03748        /* Default to global wrappers only */
03749        FG(stream_wrappers) = NULL;
03750 
03751        /* Default to global filters only */
03752        FG(stream_filters) = NULL;
03753 
03754        return SUCCESS;
03755 }
03756 /* }}} */
03757 
03758 PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
03759 {
03760        if (BG(strtok_zval)) {
03761               zval_ptr_dtor(&BG(strtok_zval));
03762        }
03763        BG(strtok_string) = NULL;
03764        BG(strtok_zval) = NULL;
03765 #ifdef HAVE_PUTENV
03766        zend_hash_destroy(&BG(putenv_ht));
03767 #endif
03768 
03769        if (BG(umask) != -1) {
03770               umask(BG(umask));
03771        }
03772 
03773        /* Check if locale was changed and change it back
03774         * to the value in startup environment */
03775        if (BG(locale_string) != NULL) {
03776               setlocale(LC_ALL, "C");
03777               setlocale(LC_CTYPE, "");
03778               zend_update_current_locale();
03779        }
03780        STR_FREE(BG(locale_string));
03781        BG(locale_string) = NULL;
03782 
03783        /* FG(stream_wrappers) and FG(stream_filters) are destroyed
03784         * during php_request_shutdown() */
03785 
03786        PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03787 #ifdef HAVE_SYSLOG_H
03788 #ifdef PHP_WIN32
03789        PHP_RSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03790 #endif
03791 #endif
03792        PHP_RSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03793        PHP_RSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03794        PHP_RSHUTDOWN(streams)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03795 #ifdef PHP_WIN32
03796        PHP_RSHUTDOWN(win32_core_globals)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03797 #endif
03798 
03799        if (BG(user_tick_functions)) {
03800               zend_llist_destroy(BG(user_tick_functions));
03801               efree(BG(user_tick_functions));
03802               BG(user_tick_functions) = NULL;
03803        }
03804 
03805        PHP_RSHUTDOWN(user_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03806        PHP_RSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
03807 
03808        BG(page_uid) = -1;
03809        BG(page_gid) = -1;
03810        return SUCCESS;
03811 }
03812 /* }}} */
03813 
03814 PHP_MINFO_FUNCTION(basic) /* {{{ */
03815 {
03816        php_info_print_table_start();
03817        PHP_MINFO(dl)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
03818        PHP_MINFO(mail)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
03819        php_info_print_table_end();
03820        PHP_MINFO(assert)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
03821 }
03822 /* }}} */
03823 
03824 /* {{{ proto mixed constant(string const_name)
03825    Given the name of a constant this function will return the constant's associated value */
03826 PHP_FUNCTION(constant)
03827 {
03828        char *const_name;
03829        int const_name_len;
03830 
03831        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &const_name, &const_name_len) == FAILURE) {
03832               return;
03833        }
03834 
03835        if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) {
03836               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %s", const_name);
03837               RETURN_NULL();
03838        }
03839 }
03840 /* }}} */
03841 
03842 #ifdef HAVE_INET_NTOP
03843 /* {{{ proto string inet_ntop(string in_addr)
03844    Converts a packed inet address to a human readable IP address string */
03845 PHP_NAMED_FUNCTION(php_inet_ntop)
03846 {
03847        char *address;
03848        int address_len, af = AF_INET;
03849        char buffer[40];
03850 
03851        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) {
03852               RETURN_FALSE;
03853        }
03854 
03855 #ifdef HAVE_IPV6
03856        if (address_len == 16) {
03857               af = AF_INET6;
03858        } else
03859 #endif
03860        if (address_len != 4) {
03861               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid in_addr value");
03862               RETURN_FALSE;
03863        }
03864 
03865        if (!inet_ntop(af, address, buffer, sizeof(buffer))) {
03866               php_error_docref(NULL TSRMLS_CC, E_WARNING, "An unknown error occured");
03867               RETURN_FALSE;
03868        }
03869 
03870        RETURN_STRING(buffer, 1);
03871 }
03872 /* }}} */
03873 #endif /* HAVE_INET_NTOP */
03874 
03875 #ifdef HAVE_INET_PTON
03876 /* {{{ proto string inet_pton(string ip_address)
03877    Converts a human readable IP address to a packed binary string */
03878 PHP_NAMED_FUNCTION(php_inet_pton)
03879 {
03880        int ret, af = AF_INET;
03881        char *address;
03882        int address_len;
03883        char buffer[17];
03884 
03885        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) {
03886               RETURN_FALSE;
03887        }
03888 
03889        memset(buffer, 0, sizeof(buffer));
03890 
03891 #ifdef HAVE_IPV6
03892        if (strchr(address, ':')) {
03893               af = AF_INET6;
03894        } else
03895 #endif
03896        if (!strchr(address, '.')) {
03897               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
03898               RETURN_FALSE;
03899        }
03900 
03901        ret = inet_pton(af, address, buffer);
03902 
03903        if (ret <= 0) {
03904               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
03905               RETURN_FALSE;
03906        }
03907 
03908        RETURN_STRINGL(buffer, af == AF_INET ? 4 : 16, 1);
03909 }
03910 /* }}} */
03911 #endif /* HAVE_INET_PTON */
03912 
03913 /* {{{ proto int ip2long(string ip_address)
03914    Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address */
03915 PHP_FUNCTION(ip2long)
03916 {
03917        char *addr;
03918        int addr_len;
03919 #ifdef HAVE_INET_PTON
03920        struct in_addr ip;
03921 #else
03922        unsigned long int ip;
03923 #endif
03924 
03925        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &addr, &addr_len) == FAILURE) {
03926               return;
03927        }
03928 
03929 #ifdef HAVE_INET_PTON
03930        if (addr_len == 0 || inet_pton(AF_INET, addr, &ip) != 1) {
03931               RETURN_FALSE;
03932        }
03933        RETURN_LONG(ntohl(ip.s_addr));
03934 #else
03935        if (addr_len == 0 || (ip = inet_addr(addr)) == INADDR_NONE) {
03936               /* The only special case when we should return -1 ourselves,
03937                * because inet_addr() considers it wrong. We return 0xFFFFFFFF and
03938                * not -1 or ~0 because of 32/64bit issues. */
03939               if (addr_len == sizeof("255.255.255.255") - 1 &&
03940                      !memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)
03941               ) {
03942                      RETURN_LONG(0xFFFFFFFF);
03943               }
03944               RETURN_FALSE;
03945        }
03946        RETURN_LONG(ntohl(ip));
03947 #endif
03948 }
03949 /* }}} */
03950 
03951 /* {{{ proto string long2ip(int proper_address)
03952    Converts an (IPv4) Internet network address into a string in Internet standard dotted format */
03953 PHP_FUNCTION(long2ip)
03954 {
03955        /* "It's a long but it's not, PHP ints are signed */
03956        char *ip;
03957        int ip_len;
03958        unsigned long n;
03959        struct in_addr myaddr;
03960 #ifdef HAVE_INET_PTON
03961        char str[40];
03962 #endif
03963 
03964        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip, &ip_len) == FAILURE) {
03965               return;
03966        }
03967 
03968        n = strtoul(ip, NULL, 0);
03969 
03970        myaddr.s_addr = htonl(n);
03971 #ifdef HAVE_INET_PTON
03972        if (inet_ntop(AF_INET, &myaddr, str, sizeof(str))) {
03973               RETURN_STRING(str, 1);
03974        } else {
03975               RETURN_FALSE;
03976        }
03977 #else
03978        RETURN_STRING(inet_ntoa(myaddr), 1);
03979 #endif
03980 }
03981 /* }}} */
03982 
03983 /********************
03984  * System Functions *
03985  ********************/
03986 
03987 /* {{{ proto string getenv(string varname)
03988    Get the value of an environment variable */
03989 PHP_FUNCTION(getenv)
03990 {
03991        char *ptr, *str;
03992        int str_len;
03993 
03994        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
03995               RETURN_FALSE;
03996        }
03997 
03998        /* SAPI method returns an emalloc()'d string */
03999        ptr = sapi_getenv(str, str_len TSRMLS_CC);
04000        if (ptr) {
04001               RETURN_STRING(ptr, 0);
04002        }
04003 #ifdef PHP_WIN32
04004        {
04005               char dummybuf;
04006               int size;
04007 
04008               SetLastError(0);
04009               /*If the given bugger is not large enough to hold the data, the return value is 
04010               the buffer size,  in characters, required to hold the string and its terminating 
04011               null character. We use this return value to alloc the final buffer. */
04012               size = GetEnvironmentVariableA(str, &dummybuf, 0);
04013               if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
04014                             /* The environment variable doesn't exist. */
04015                             RETURN_FALSE;
04016               }
04017 
04018               if (size == 0) {
04019                             /* env exists, but it is empty */
04020                             RETURN_EMPTY_STRING();
04021               }
04022 
04023               ptr = emalloc(size);
04024               size = GetEnvironmentVariableA(str, ptr, size);
04025               if (size == 0) {
04026                             /* has been removed between the two calls */
04027                             efree(ptr);
04028                             RETURN_EMPTY_STRING();
04029               } else {
04030                      RETURN_STRING(ptr, 0);
04031               }
04032        }
04033 #else
04034        /* system method returns a const */
04035        ptr = getenv(str);
04036        if (ptr) {
04037               RETURN_STRING(ptr, 1);
04038        }
04039 #endif
04040        RETURN_FALSE;
04041 }
04042 /* }}} */
04043 
04044 #ifdef HAVE_PUTENV
04045 /* {{{ proto bool putenv(string setting)
04046    Set the value of an environment variable */
04047 PHP_FUNCTION(putenv)
04048 {
04049        char *setting;
04050        int setting_len;
04051 
04052        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &setting, &setting_len) == FAILURE) {
04053               return;
04054        }
04055 
04056        if (setting_len) {
04057               char *p, **env;
04058               putenv_entry pe;
04059 #ifdef PHP_WIN32
04060               char *value = NULL;
04061               int equals = 0;
04062               int error_code;
04063 #endif
04064 
04065               pe.putenv_string = estrndup(setting, setting_len);
04066               pe.key = estrndup(setting, setting_len);
04067               if ((p = strchr(pe.key, '='))) {   /* nullify the '=' if there is one */
04068                      *p = '\0';
04069 #ifdef PHP_WIN32
04070                      equals = 1;
04071 #endif
04072               }
04073 
04074               pe.key_len = strlen(pe.key);
04075 #ifdef PHP_WIN32
04076               if (equals) {
04077                      if (pe.key_len < setting_len - 1) {
04078                             value = p + 1;
04079                      } else {
04080                             /* empty string*/
04081                             value = p;
04082                      }
04083               }
04084 #endif
04085 
04086               if (PG(safe_mode)) {
04087                      /* Check the protected list */
04088                      if (zend_hash_exists(&BG(sm_protected_env_vars), pe.key, pe.key_len)) {
04089                             php_error_docref(NULL TSRMLS_CC, E_WARNING, "Safe Mode warning: Cannot override protected environment variable '%s'", pe.key);
04090                             efree(pe.putenv_string);
04091                             efree(pe.key);
04092                             RETURN_FALSE;
04093                      }
04094 
04095                      /* Check the allowed list */
04096                      if (BG(sm_allowed_env_vars) && *BG(sm_allowed_env_vars)) {
04097                             char *allowed_env_vars = estrdup(BG(sm_allowed_env_vars));
04098                             char *strtok_buf = NULL;
04099                             char *allowed_prefix = php_strtok_r(allowed_env_vars, ", ", &strtok_buf);
04100                             zend_bool allowed = 0;
04101 
04102                             while (allowed_prefix) {
04103                                    if (!strncmp(allowed_prefix, pe.key, strlen(allowed_prefix))) {
04104                                           allowed = 1;
04105                                           break;
04106                                    }
04107                                    allowed_prefix = php_strtok_r(NULL, ", ", &strtok_buf);
04108                             }
04109                             efree(allowed_env_vars);
04110                             if (!allowed) {
04111                                    php_error_docref(NULL TSRMLS_CC, E_WARNING, "Safe Mode warning: Cannot set environment variable '%s' - it's not in the allowed list", pe.key);
04112                                    efree(pe.putenv_string);
04113                                    efree(pe.key);
04114                                    RETURN_FALSE;
04115                             }
04116                      }
04117               }
04118 
04119               zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
04120 
04121               /* find previous value */
04122               pe.previous_value = NULL;
04123               for (env = environ; env != NULL && *env != NULL; env++) {
04124                      if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') {       /* found it */
04125 #if defined(PHP_WIN32)
04126                             /* must copy previous value because MSVCRT's putenv can free the string without notice */
04127                             pe.previous_value = estrdup(*env);
04128 #else
04129                             pe.previous_value = *env;
04130 #endif
04131                             break;
04132                      }
04133               }
04134 
04135 #if HAVE_UNSETENV
04136               if (!p) { /* no '=' means we want to unset it */
04137                      unsetenv(pe.putenv_string);
04138               }
04139               if (!p || putenv(pe.putenv_string) == 0) { /* success */
04140 #else
04141 # ifndef PHP_WIN32
04142               if (putenv(pe.putenv_string) == 0) { /* success */
04143 # else
04144               error_code = SetEnvironmentVariable(pe.key, value);
04145 #  if _MSC_VER < 1500
04146               /* Yet another VC6 bug, unset may return env not found */
04147               if (error_code != 0 || 
04148                      (error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
04149 #  else
04150               if (error_code != 0) { /* success */
04151 #  endif
04152 # endif
04153 #endif
04154                      zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);
04155 #ifdef HAVE_TZSET
04156                      if (!strncmp(pe.key, "TZ", pe.key_len)) {
04157                             tzset();
04158                      }
04159 #endif
04160                      RETURN_TRUE;
04161               } else {
04162                      efree(pe.putenv_string);
04163                      efree(pe.key);
04164                      RETURN_FALSE;
04165               }
04166        }
04167 
04168        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax");
04169        RETURN_FALSE;
04170 }
04171 /* }}} */
04172 #endif
04173 
04174 /* {{{ free_argv()
04175    Free the memory allocated to an argv array. */
04176 static void free_argv(char **argv, int argc)
04177 {
04178        int i;
04179 
04180        if (argv) {
04181               for (i = 0; i < argc; i++) {
04182                      if (argv[i]) {
04183                             efree(argv[i]);
04184                      }
04185               }
04186               efree(argv);
04187        }
04188 }
04189 /* }}} */
04190 
04191 /* {{{ free_longopts()
04192    Free the memory allocated to an longopt array. */
04193 static void free_longopts(opt_struct *longopts)
04194 {
04195        opt_struct *p;
04196 
04197        if (longopts) {
04198               for (p = longopts; p && p->opt_char != '-'; p++) {
04199                      if (p->opt_name != NULL) {
04200                             efree((char *)(p->opt_name));
04201                      }
04202               }
04203        }
04204 }
04205 /* }}} */
04206 
04207 /* {{{ parse_opts()
04208    Convert the typical getopt input characters to the php_getopt struct array */
04209 static int parse_opts(char * opts, opt_struct ** result)
04210 {
04211        opt_struct * paras = NULL;
04212        unsigned int i, count = 0;
04213 
04214        for (i = 0; i < strlen(opts); i++) {
04215               if ((opts[i] >= 48 && opts[i] <= 57) ||
04216                      (opts[i] >= 65 && opts[i] <= 90) ||
04217                      (opts[i] >= 97 && opts[i] <= 122)
04218               ) {
04219                      count++;
04220               }
04221        }
04222 
04223        paras = safe_emalloc(sizeof(opt_struct), count, 0);
04224        memset(paras, 0, sizeof(opt_struct) * count);
04225        *result = paras;
04226        while ( (*opts >= 48 && *opts <= 57) || /* 0 - 9 */
04227                      (*opts >= 65 && *opts <= 90) || /* A - Z */
04228                      (*opts >= 97 && *opts <= 122)   /* a - z */
04229        ) {
04230               paras->opt_char = *opts;
04231               paras->need_param = (*(++opts) == ':') ? 1 : 0;
04232               paras->opt_name = NULL;
04233               if (paras->need_param == 1) {
04234                      opts++;
04235                      if (*opts == ':') {
04236                             paras->need_param++;
04237                             opts++;
04238                      }
04239               }
04240               paras++;
04241        }
04242        return count;
04243 }
04244 /* }}} */
04245 
04246 /* {{{ proto array getopt(string options [, array longopts])
04247    Get options from the command line argument list */
04248 PHP_FUNCTION(getopt)
04249 {
04250        char *options = NULL, **argv = NULL;
04251        char opt[2] = { '\0' };
04252        char *optname;
04253        int argc = 0, options_len = 0, len, o;
04254        char *php_optarg = NULL;
04255        int php_optind = 1;
04256        zval *val, **args = NULL, *p_longopts = NULL;
04257        int optname_len = 0;
04258        opt_struct *opts, *orig_opts;
04259 
04260        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &options, &options_len, &p_longopts) == FAILURE) {
04261               RETURN_FALSE;
04262        }
04263 
04264        /* Get argv from the global symbol table. We calculate argc ourselves
04265         * in order to be on the safe side, even though it is also available
04266         * from the symbol table. */
04267        if (PG(http_globals)[TRACK_VARS_SERVER] &&
04268               (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
04269               zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY
04270        ) {
04271               int pos = 0;
04272               zval **entry;
04273 
04274               argc = zend_hash_num_elements(Z_ARRVAL_PP(args));
04275 
04276               /* Attempt to allocate enough memory to hold all of the arguments
04277                * and a trailing NULL */
04278               argv = (char **) safe_emalloc(sizeof(char *), (argc + 1), 0);
04279 
04280               /* Reset the array indexes. */
04281               zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args));
04282 
04283               /* Iterate over the hash to construct the argv array. */
04284               while (zend_hash_get_current_data(Z_ARRVAL_PP(args), (void **)&entry) == SUCCESS) {
04285                      zval arg, *arg_ptr = *entry;
04286 
04287                      if (Z_TYPE_PP(entry) != IS_STRING) {
04288                             arg = **entry;
04289                             zval_copy_ctor(&arg);
04290                             convert_to_string(&arg);
04291                             arg_ptr = &arg;
04292                      }
04293 
04294                      argv[pos++] = estrdup(Z_STRVAL_P(arg_ptr));
04295 
04296                      if (arg_ptr != *entry) {
04297                             zval_dtor(&arg);
04298                      }
04299 
04300                      zend_hash_move_forward(Z_ARRVAL_PP(args));
04301               }
04302 
04303               /* The C Standard requires argv[argc] to be NULL - this might
04304                * keep some getopt implementations happy. */
04305               argv[argc] = NULL;
04306        } else {
04307               /* Return false if we can't find argv. */
04308               RETURN_FALSE;
04309        }
04310 
04311        len = parse_opts(options, &opts);
04312 
04313        if (p_longopts) {
04314               int count;
04315               zval **entry;
04316 
04317               count = zend_hash_num_elements(Z_ARRVAL_P(p_longopts));
04318 
04319               /* the first <len> slots are filled by the one short ops
04320                * we now extend our array and jump to the new added structs */
04321               opts = (opt_struct *) erealloc(opts, sizeof(opt_struct) * (len + count + 1));
04322               orig_opts = opts;
04323               opts += len;
04324 
04325               memset(opts, 0, count * sizeof(opt_struct));
04326 
04327               /* Reset the array indexes. */
04328               zend_hash_internal_pointer_reset(Z_ARRVAL_P(p_longopts));
04329 
04330               /* Iterate over the hash to construct the argv array. */
04331               while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), (void **)&entry) == SUCCESS) {
04332                      zval arg, *arg_ptr = *entry;
04333 
04334                      if (Z_TYPE_PP(entry) != IS_STRING) {
04335                             arg = **entry;
04336                             zval_copy_ctor(&arg);
04337                             convert_to_string(&arg);
04338                             arg_ptr = &arg;
04339                      }
04340 
04341                      opts->need_param = 0;
04342                      opts->opt_name = estrdup(Z_STRVAL_P(arg_ptr));
04343                      len = strlen(opts->opt_name);
04344                      if ((len > 0) && (opts->opt_name[len - 1] == ':')) {
04345                             opts->need_param++;
04346                             opts->opt_name[len - 1] = '\0';
04347                             if ((len > 1) && (opts->opt_name[len - 2] == ':')) {
04348                                    opts->need_param++;
04349                                    opts->opt_name[len - 2] = '\0';
04350                             }
04351                      }
04352                      opts->opt_char = 0;
04353                      opts++;
04354 
04355                      if (arg_ptr != *entry) {
04356                             zval_dtor(&arg);
04357                      }
04358 
04359                      zend_hash_move_forward(Z_ARRVAL_P(p_longopts));
04360               }
04361        } else {
04362               opts = (opt_struct*) erealloc(opts, sizeof(opt_struct) * (len + 1));
04363               orig_opts = opts;
04364               opts += len;
04365        }
04366 
04367        /* php_getopt want to identify the last param */
04368        opts->opt_char   = '-';
04369        opts->need_param = 0;
04370        opts->opt_name   = NULL;
04371 
04372        /* Initialize the return value as an array. */
04373        array_init(return_value);
04374 
04375        /* after our pointer arithmetic jump back to the first element */
04376        opts = orig_opts;
04377 
04378        while ((o = php_getopt(argc, argv, opts, &php_optarg, &php_optind, 0, 1)) != -1) {
04379               /* Skip unknown arguments. */
04380               if (o == '?') {
04381                      continue;
04382               }
04383 
04384               /* Prepare the option character and the argument string. */
04385               if (o == 0) {
04386                      optname = opts[php_optidx].opt_name;
04387               } else {
04388                      if (o == 1) {
04389                             o = '-';
04390                      }
04391                      opt[0] = o;
04392                      optname = opt;
04393               }
04394 
04395               MAKE_STD_ZVAL(val);
04396               if (php_optarg != NULL) {
04397                      /* keep the arg as binary, since the encoding is not known */
04398                      ZVAL_STRING(val, php_optarg, 1);
04399               } else {
04400                      ZVAL_FALSE(val);
04401               }
04402 
04403               /* Add this option / argument pair to the result hash. */
04404               optname_len = strlen(optname);
04405               if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) {
04406                      /* numeric string */
04407                      int optname_int = atoi(optname);
04408                      if (zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) {
04409                             if (Z_TYPE_PP(args) != IS_ARRAY) {
04410                                    convert_to_array_ex(args);
04411                             }
04412                             zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
04413                      } else {
04414                             zend_hash_index_update(HASH_OF(return_value), optname_int, &val, sizeof(zval *), NULL);
04415                      }
04416               } else {
04417                      /* other strings */
04418                      if (zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) {
04419                             if (Z_TYPE_PP(args) != IS_ARRAY) {
04420                                    convert_to_array_ex(args);
04421                             }
04422                             zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
04423                      } else {
04424                             zend_hash_add(HASH_OF(return_value), optname, strlen(optname)+1, (void *)&val, sizeof(zval *), NULL);
04425                      }
04426               }
04427 
04428               php_optarg = NULL;
04429        }
04430 
04431        free_longopts(orig_opts);
04432        efree(orig_opts);
04433        free_argv(argv, argc);
04434 }
04435 /* }}} */
04436 
04437 /* {{{ proto void flush(void)
04438    Flush the output buffer */
04439 PHP_FUNCTION(flush)
04440 {
04441        sapi_flush(TSRMLS_C);
04442 }
04443 /* }}} */
04444 
04445 /* {{{ proto void sleep(int seconds)
04446    Delay for a given number of seconds */
04447 PHP_FUNCTION(sleep)
04448 {
04449        long num;
04450 
04451        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) {
04452               RETURN_FALSE;
04453        }
04454        if (num < 0) {
04455               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of seconds must be greater than or equal to 0");
04456               RETURN_FALSE;
04457        }
04458 #ifdef PHP_SLEEP_NON_VOID
04459        RETURN_LONG(php_sleep(num));
04460 #else
04461        php_sleep(num);
04462 #endif
04463 
04464 }
04465 /* }}} */
04466 
04467 /* {{{ proto void usleep(int micro_seconds)
04468    Delay for a given number of micro seconds */
04469 PHP_FUNCTION(usleep)
04470 {
04471 #if HAVE_USLEEP
04472        long num;
04473 
04474        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) {
04475               return;
04476        }
04477        if (num < 0) {
04478               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of microseconds must be greater than or equal to 0");
04479               RETURN_FALSE;
04480        }
04481        usleep(num);
04482 #endif
04483 }
04484 /* }}} */
04485 
04486 #if HAVE_NANOSLEEP
04487 /* {{{ proto mixed time_nanosleep(long seconds, long nanoseconds)
04488    Delay for a number of seconds and nano seconds */
04489 PHP_FUNCTION(time_nanosleep)
04490 {
04491        long tv_sec, tv_nsec;
04492        struct timespec php_req, php_rem;
04493 
04494        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) {
04495               return;
04496        }
04497 
04498        php_req.tv_sec = (time_t) tv_sec;
04499        php_req.tv_nsec = tv_nsec;
04500        if (!nanosleep(&php_req, &php_rem)) {
04501               RETURN_TRUE;
04502        } else if (errno == EINTR) {
04503               array_init(return_value);
04504               add_assoc_long_ex(return_value, "seconds", sizeof("seconds"), php_rem.tv_sec);
04505               add_assoc_long_ex(return_value, "nanoseconds", sizeof("nanoseconds"), php_rem.tv_nsec);
04506               return;
04507        } else if (errno == EINVAL) {
04508               php_error_docref(NULL TSRMLS_CC, E_WARNING, "nanoseconds was not in the range 0 to 999 999 999 or seconds was negative");
04509        }
04510 
04511        RETURN_FALSE;
04512 }
04513 /* }}} */
04514 
04515 /* {{{ proto mixed time_sleep_until(float timestamp)
04516    Make the script sleep until the specified time */
04517 PHP_FUNCTION(time_sleep_until)
04518 {
04519        double d_ts, c_ts;
04520        struct timeval tm;
04521        struct timespec php_req, php_rem;
04522 
04523        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &d_ts) == FAILURE) {
04524               return;
04525        }
04526 
04527        if (gettimeofday((struct timeval *) &tm, NULL) != 0) {
04528               RETURN_FALSE;
04529        }
04530 
04531        c_ts = (double)(d_ts - tm.tv_sec - tm.tv_usec / 1000000.00);
04532        if (c_ts < 0) {
04533               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sleep until to time is less than current time");
04534               RETURN_FALSE;
04535        }
04536 
04537        php_req.tv_sec = (time_t) c_ts;
04538        if (php_req.tv_sec > c_ts) { /* rounding up occurred */
04539               php_req.tv_sec--;
04540        }
04541        /* 1sec = 1000000000 nanoseconds */
04542        php_req.tv_nsec = (long) ((c_ts - php_req.tv_sec) * 1000000000.00);
04543 
04544        while (nanosleep(&php_req, &php_rem)) {
04545               if (errno == EINTR) {
04546                      php_req.tv_sec = php_rem.tv_sec;
04547                      php_req.tv_nsec = php_rem.tv_nsec;
04548               } else {
04549                      RETURN_FALSE;
04550               }
04551        }
04552 
04553        RETURN_TRUE;
04554 }
04555 /* }}} */
04556 #endif
04557 
04558 /* {{{ proto string get_current_user(void)
04559    Get the name of the owner of the current PHP script */
04560 PHP_FUNCTION(get_current_user)
04561 {
04562        if (zend_parse_parameters_none() == FAILURE) {
04563               return;
04564        }
04565 
04566        RETURN_STRING(php_get_current_user(), 1);
04567 }
04568 /* }}} */
04569 
04570 /* {{{ add_config_entry_cb
04571  */
04572 static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
04573 {
04574        zval *retval = (zval *)va_arg(args, zval*);
04575        zval *tmp;
04576 
04577        if (Z_TYPE_P(entry) == IS_STRING) {
04578               if (hash_key->nKeyLength > 0) {
04579                      add_assoc_stringl_ex(retval, hash_key->arKey, hash_key->nKeyLength, Z_STRVAL_P(entry), Z_STRLEN_P(entry), 1);
04580               } else {
04581                      add_index_stringl(retval, hash_key->h, Z_STRVAL_P(entry), Z_STRLEN_P(entry), 1);
04582               }
04583        } else if (Z_TYPE_P(entry) == IS_ARRAY) {
04584               MAKE_STD_ZVAL(tmp);
04585               array_init(tmp);
04586               zend_hash_apply_with_arguments(Z_ARRVAL_P(entry) TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, tmp);
04587               add_assoc_zval_ex(retval, hash_key->arKey, hash_key->nKeyLength, tmp);
04588        }
04589        return 0;
04590 }
04591 /* }}} */
04592 
04593 /* {{{ proto mixed get_cfg_var(string option_name)
04594    Get the value of a PHP configuration option */
04595 PHP_FUNCTION(get_cfg_var)
04596 {
04597        char *varname;
04598        int varname_len;
04599        zval *retval;
04600 
04601        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
04602               return;
04603        }
04604 
04605        retval = cfg_get_entry(varname, varname_len + 1);
04606 
04607        if (retval) {
04608               if (Z_TYPE_P(retval) == IS_ARRAY) {
04609                      array_init(return_value);
04610                      zend_hash_apply_with_arguments(Z_ARRVAL_P(retval) TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, return_value);
04611                      return;
04612               } else {
04613                      RETURN_STRING(Z_STRVAL_P(retval), 1);
04614               }
04615        } else {
04616               RETURN_FALSE;
04617        }
04618 }
04619 /* }}} */
04620 
04621 /* {{{ proto bool set_magic_quotes_runtime(int new_setting)
04622    Set the current active configuration setting of magic_quotes_runtime and return previous */
04623 PHP_FUNCTION(set_magic_quotes_runtime)
04624 {
04625        zend_bool new_setting;
04626 
04627        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &new_setting) == FAILURE) {
04628               return;
04629        }
04630 
04631        PG(magic_quotes_runtime) = new_setting;
04632        RETURN_TRUE;
04633 }
04634 /* }}} */
04635 
04636 /* {{{ proto int get_magic_quotes_runtime(void)
04637    Get the current active configuration setting of magic_quotes_runtime */
04638 PHP_FUNCTION(get_magic_quotes_runtime)
04639 {
04640        RETURN_LONG(PG(magic_quotes_runtime));
04641 }
04642 /* }}} */
04643 
04644 /* {{{ proto int get_magic_quotes_gpc(void)
04645    Get the current active configuration setting of magic_quotes_gpc */
04646 PHP_FUNCTION(get_magic_quotes_gpc)
04647 {
04648        RETURN_LONG(PG(magic_quotes_gpc));
04649 }
04650 /* }}} */
04651 
04652 /*
04653        1st arg = error message
04654        2nd arg = error option
04655        3rd arg = optional parameters (email address or tcp address)
04656        4th arg = used for additional headers if email
04657 
04658 error options:
04659        0 = send to php_error_log (uses syslog or file depending on ini setting)
04660        1 = send via email to 3rd parameter 4th option = additional headers
04661        2 = send via tcp/ip to 3rd parameter (name or ip:port)
04662        3 = save to file in 3rd parameter
04663        4 = send to SAPI logger directly
04664 */
04665 
04666 /* {{{ proto bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])
04667    Send an error message somewhere */
04668 PHP_FUNCTION(error_log)
04669 {
04670        char *message, *opt = NULL, *headers = NULL;
04671        int message_len, opt_len = 0, headers_len = 0;
04672        int opt_err = 0, argc = ZEND_NUM_ARGS();
04673        long erropt = 0;
04674 
04675        if (zend_parse_parameters(argc TSRMLS_CC, "s|lss", &message, &message_len, &erropt, &opt, &opt_len, &headers, &headers_len) == FAILURE) {
04676               return;
04677        }
04678 
04679        if (argc > 1) {
04680               opt_err = erropt;
04681        }
04682 
04683        if (opt_err == 3 && opt) {
04684               if (strlen(opt) != opt_len) {
04685                      RETURN_FALSE;
04686               }
04687        }
04688 
04689        if (_php_error_log_ex(opt_err, message, message_len, opt, headers TSRMLS_CC) == FAILURE) {
04690               RETURN_FALSE;
04691        }
04692 
04693        RETURN_TRUE;
04694 }
04695 /* }}} */
04696 
04697 /* For BC (not binary-safe!) */
04698 PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC) /* {{{ */
04699 {
04700        return _php_error_log_ex(opt_err, message, (opt_err == 3) ? strlen(message) : 0, opt, headers TSRMLS_CC);
04701 }
04702 /* }}} */
04703 
04704 PHPAPI int _php_error_log_ex(int opt_err, char *message, int message_len, char *opt, char *headers TSRMLS_DC) /* {{{ */
04705 {
04706        php_stream *stream = NULL;
04707 
04708        switch (opt_err)
04709        {
04710               case 1:              /*send an email */
04711                      if (!php_mail(opt, "PHP error_log message", message, headers, NULL TSRMLS_CC)) {
04712                             return FAILURE;
04713                      }
04714                      break;
04715 
04716               case 2:              /*send to an address */
04717                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "TCP/IP option not available!");
04718                      return FAILURE;
04719                      break;
04720 
04721               case 3:              /*save to a file */
04722                      stream = php_stream_open_wrapper(opt, "a", IGNORE_URL_WIN | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
04723                      if (!stream) {
04724                             return FAILURE;
04725                      }
04726                      php_stream_write(stream, message, message_len);
04727                      php_stream_close(stream);
04728                      break;
04729 
04730               case 4: /* send to SAPI */
04731                      if (sapi_module.log_message) {
04732                             sapi_module.log_message(message);
04733                      } else {
04734                             return FAILURE;
04735                      }
04736                      break;
04737 
04738               default:
04739                      php_log_err(message TSRMLS_CC);
04740                      break;
04741        }
04742        return SUCCESS;
04743 }
04744 /* }}} */
04745 
04746 /* {{{ proto array error_get_last()
04747    Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet. */
04748 PHP_FUNCTION(error_get_last)
04749 {
04750        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
04751               return;
04752        }
04753 
04754        if (PG(last_error_message)) {
04755               array_init(return_value);
04756               add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type));
04757               add_assoc_string_ex(return_value, "message", sizeof("message"), PG(last_error_message), 1);
04758               add_assoc_string_ex(return_value, "file", sizeof("file"), PG(last_error_file)?PG(last_error_file):"-", 1 );
04759               add_assoc_long_ex(return_value, "line", sizeof("line"), PG(last_error_lineno));
04760        }
04761 }
04762 /* }}} */
04763 
04764 /* {{{ proto mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])
04765    Call a user function which is the first parameter */
04766 PHP_FUNCTION(call_user_func)
04767 {
04768        zval *retval_ptr = NULL;
04769        zend_fcall_info fci;
04770        zend_fcall_info_cache fci_cache;
04771 
04772        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
04773               return;
04774        }
04775 
04776        fci.retval_ptr_ptr = &retval_ptr;
04777 
04778        if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
04779               COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
04780        }
04781 
04782        if (fci.params) {
04783               efree(fci.params);
04784        }
04785 }
04786 /* }}} */
04787 
04788 /* {{{ proto mixed call_user_func_array(string function_name, array parameters)
04789    Call a user function which is the first parameter with the arguments contained in array */
04790 PHP_FUNCTION(call_user_func_array)
04791 {
04792        zval *params, *retval_ptr = NULL;
04793        zend_fcall_info fci;
04794        zend_fcall_info_cache fci_cache;
04795 
04796        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "fa/", &fci, &fci_cache, &params) == FAILURE) {
04797               return;
04798        }
04799 
04800        zend_fcall_info_args(&fci, params TSRMLS_CC);
04801        fci.retval_ptr_ptr = &retval_ptr;
04802 
04803        if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
04804               COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
04805        }
04806 
04807        zend_fcall_info_args_clear(&fci, 1);
04808 }
04809 /* }}} */
04810 
04811 /* {{{ proto mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])
04812    Call a user method on a specific object or class */
04813 PHP_FUNCTION(call_user_method)
04814 {
04815        zval ***params = NULL;
04816        int n_params = 0;
04817        zval *retval_ptr;
04818        zval *callback, *object;
04819 
04820        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/z*", &callback, &object, &params, &n_params) == FAILURE) {
04821               return;
04822        }
04823 
04824        if (Z_TYPE_P(object) != IS_OBJECT &&
04825               Z_TYPE_P(object) != IS_STRING
04826        ) {
04827               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
04828               if (params) {
04829                      efree(params);
04830               }
04831               RETURN_FALSE;
04832        }
04833 
04834        convert_to_string(callback);
04835 
04836        if (call_user_function_ex(EG(function_table), &object, callback, &retval_ptr, n_params, params, 0, NULL TSRMLS_CC) == SUCCESS) {
04837               if (retval_ptr) {
04838                      COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
04839               }
04840        } else {
04841               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_P(callback));
04842        }
04843        if (n_params) {
04844               efree(params);
04845        }
04846 }
04847 /* }}} */
04848 
04849 /* {{{ proto mixed call_user_method_array(string method_name, mixed object, array params)
04850    Call a user method on a specific object or class using a parameter array */
04851 PHP_FUNCTION(call_user_method_array)
04852 {
04853        zval *params, ***method_args = NULL, *retval_ptr;
04854        zval *callback, *object;
04855        HashTable *params_ar;
04856        int num_elems, element = 0;
04857 
04858        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/zA/", &callback, &object, &params) == FAILURE) {
04859               return;
04860        }
04861 
04862        if (Z_TYPE_P(object) != IS_OBJECT &&
04863               Z_TYPE_P(object) != IS_STRING
04864        ) {
04865               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
04866               RETURN_FALSE;
04867        }
04868 
04869        convert_to_string(callback);
04870 
04871        params_ar = HASH_OF(params);
04872        num_elems = zend_hash_num_elements(params_ar);
04873        method_args = (zval ***) safe_emalloc(sizeof(zval **), num_elems, 0);
04874 
04875        for (zend_hash_internal_pointer_reset(params_ar);
04876               zend_hash_get_current_data(params_ar, (void **) &(method_args[element])) == SUCCESS;
04877               zend_hash_move_forward(params_ar)
04878        ) {
04879               element++;
04880        }
04881 
04882        if (call_user_function_ex(EG(function_table), &object, callback, &retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS) {
04883               if (retval_ptr) {
04884                      COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
04885               }
04886        } else {
04887               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_P(callback));
04888        }
04889 
04890        efree(method_args);
04891 }
04892 /* }}} */
04893 
04894 /* {{{ proto mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...]) U
04895    Call a user function which is the first parameter */
04896 PHP_FUNCTION(forward_static_call)
04897 {
04898        zval *retval_ptr = NULL;
04899        zend_fcall_info fci;
04900        zend_fcall_info_cache fci_cache;
04901 
04902        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
04903               return;
04904        }
04905 
04906        if (!EG(active_op_array)->scope) {
04907               zend_error(E_ERROR, "Cannot call forward_static_call() when no class scope is active");
04908        }
04909 
04910        fci.retval_ptr_ptr = &retval_ptr;
04911 
04912        if (EG(called_scope) &&
04913               instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
04914                      fci_cache.called_scope = EG(called_scope);
04915        }
04916        
04917        if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
04918               COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
04919        }
04920 
04921        if (fci.params) {
04922               efree(fci.params);
04923        }
04924 }
04925 /* }}} */
04926 
04927 /* {{{ proto mixed call_user_func_array(string function_name, array parameters) U
04928    Call a user function which is the first parameter with the arguments contained in array */
04929 PHP_FUNCTION(forward_static_call_array)
04930 {
04931        zval *params, *retval_ptr = NULL;
04932        zend_fcall_info fci;
04933        zend_fcall_info_cache fci_cache;
04934 
04935        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "fa/", &fci, &fci_cache, &params) == FAILURE) {
04936               return;
04937        }
04938 
04939        zend_fcall_info_args(&fci, params TSRMLS_CC);
04940        fci.retval_ptr_ptr = &retval_ptr;
04941 
04942        if (EG(called_scope) &&
04943               instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
04944                      fci_cache.called_scope = EG(called_scope);
04945        }
04946 
04947        if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
04948               COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
04949        }
04950 
04951        zend_fcall_info_args_clear(&fci, 1);
04952 }
04953 /* }}} */
04954 
04955 void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */
04956 {
04957        int i;
04958 
04959        for (i = 0; i < shutdown_function_entry->arg_count; i++) {
04960               zval_ptr_dtor(&shutdown_function_entry->arguments[i]);
04961        }
04962        efree(shutdown_function_entry->arguments);
04963 }
04964 /* }}} */
04965 
04966 void user_tick_function_dtor(user_tick_function_entry *tick_function_entry) /* {{{ */
04967 {
04968        int i;
04969 
04970        for (i = 0; i < tick_function_entry->arg_count; i++) {
04971               zval_ptr_dtor(&tick_function_entry->arguments[i]);
04972        }
04973        efree(tick_function_entry->arguments);
04974 }
04975 /* }}} */
04976 
04977 static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) /* {{{ */
04978 {
04979        zval retval;
04980        char *function_name;
04981 
04982        if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name TSRMLS_CC)) {
04983               php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name);
04984               if (function_name) {
04985                      efree(function_name);
04986               }
04987               return 0;
04988        }
04989        if (function_name) {
04990               efree(function_name);
04991        }
04992 
04993        if (call_user_function(EG(function_table), NULL,
04994                             shutdown_function_entry->arguments[0],
04995                             &retval,
04996                             shutdown_function_entry->arg_count - 1,
04997                             shutdown_function_entry->arguments + 1
04998                             TSRMLS_CC ) == SUCCESS)
04999        {
05000               zval_dtor(&retval);
05001        }
05002        return 0;
05003 }
05004 /* }}} */
05005 
05006 static void user_tick_function_call(user_tick_function_entry *tick_fe TSRMLS_DC) /* {{{ */
05007 {
05008        zval retval;
05009        zval *function = tick_fe->arguments[0];
05010 
05011        /* Prevent reentrant calls to the same user ticks function */
05012        if (! tick_fe->calling) {
05013               tick_fe->calling = 1;
05014 
05015               if (call_user_function(     EG(function_table), NULL,
05016                                                         function,
05017                                                         &retval,
05018                                                         tick_fe->arg_count - 1,
05019                                                         tick_fe->arguments + 1
05020                                                         TSRMLS_CC) == SUCCESS) {
05021                      zval_dtor(&retval);
05022 
05023               } else {
05024                      zval **obj, **method;
05025 
05026                      if (Z_TYPE_P(function) == IS_STRING) {
05027                             php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(function));
05028                      } else if (   Z_TYPE_P(function) == IS_ARRAY
05029                                           && zend_hash_index_find(Z_ARRVAL_P(function), 0, (void **) &obj) == SUCCESS
05030                                           && zend_hash_index_find(Z_ARRVAL_P(function), 1, (void **) &method) == SUCCESS
05031                                           && Z_TYPE_PP(obj) == IS_OBJECT
05032                                           && Z_TYPE_PP(method) == IS_STRING) {
05033                             php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s::%s() - function does not exist", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method));
05034                      } else {
05035                             php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call tick function");
05036                      }
05037               }
05038 
05039               tick_fe->calling = 0;
05040        }
05041 }
05042 /* }}} */
05043 
05044 static void run_user_tick_functions(int tick_count) /* {{{ */
05045 {
05046        TSRMLS_FETCH();
05047 
05048        zend_llist_apply(BG(user_tick_functions), (llist_apply_func_t) user_tick_function_call TSRMLS_CC);
05049 }
05050 /* }}} */
05051 
05052 static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_tick_function_entry * tick_fe2) /* {{{ */
05053 {
05054        zval *func1 = tick_fe1->arguments[0];
05055        zval *func2 = tick_fe2->arguments[0];
05056        int ret;
05057        TSRMLS_FETCH();
05058 
05059        if (Z_TYPE_P(func1) == IS_STRING && Z_TYPE_P(func2) == IS_STRING) {
05060               ret = (zend_binary_zval_strcmp(func1, func2) == 0);
05061        } else if (Z_TYPE_P(func1) == IS_ARRAY && Z_TYPE_P(func2) == IS_ARRAY) {
05062               zval result;
05063               zend_compare_arrays(&result, func1, func2 TSRMLS_CC);
05064               ret = (Z_LVAL(result) == 0);
05065        } else if (Z_TYPE_P(func1) == IS_OBJECT && Z_TYPE_P(func2) == IS_OBJECT) {
05066               zval result;
05067               zend_compare_objects(&result, func1, func2 TSRMLS_CC);
05068               ret = (Z_LVAL(result) == 0);
05069        } else {
05070               ret = 0;
05071        }
05072 
05073        if (ret && tick_fe1->calling) {
05074               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to delete tick function executed at the moment");
05075               return 0;
05076        }
05077        return ret;
05078 }
05079 /* }}} */
05080 
05081 void php_call_shutdown_functions(TSRMLS_D) /* {{{ */
05082 {
05083        if (BG(user_shutdown_function_names)) {
05084               zend_try {
05085                      zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC);
05086               }
05087               zend_end_try();
05088               php_free_shutdown_functions(TSRMLS_C);
05089        }
05090 }
05091 /* }}} */
05092 
05093 void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
05094 {
05095        if (BG(user_shutdown_function_names))
05096               zend_try {
05097                      zend_hash_destroy(BG(user_shutdown_function_names));
05098                      FREE_HASHTABLE(BG(user_shutdown_function_names));
05099                      BG(user_shutdown_function_names) = NULL;
05100               }
05101               zend_end_try();
05102 }
05103 /* }}} */
05104 
05105 /* {{{ proto void register_shutdown_function(string function_name) U
05106    Register a user-level function to be called on request termination */
05107 PHP_FUNCTION(register_shutdown_function)
05108 {
05109        php_shutdown_function_entry shutdown_function_entry;
05110        char *function_name = NULL;
05111        int i;
05112 
05113        shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
05114 
05115        if (shutdown_function_entry.arg_count < 1) {
05116               WRONG_PARAM_COUNT;
05117        }
05118 
05119        shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
05120 
05121        if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
05122               efree(shutdown_function_entry.arguments);
05123               RETURN_FALSE;
05124        }
05125 
05126        /* Prevent entering of anything but valid callback (syntax check only!) */
05127        if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name TSRMLS_CC)) {
05128               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name);
05129               efree(shutdown_function_entry.arguments);
05130               RETVAL_FALSE;
05131        } else {
05132               if (!BG(user_shutdown_function_names)) {
05133                      ALLOC_HASHTABLE(BG(user_shutdown_function_names));
05134                      zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
05135               }
05136 
05137               for (i = 0; i < shutdown_function_entry.arg_count; i++) {
05138                      Z_ADDREF_P(shutdown_function_entry.arguments[i]);
05139               }
05140               zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
05141        }
05142        if (function_name) {
05143               efree(function_name);
05144        }
05145 }
05146 /* }}} */
05147 
05148 ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini) /* {{{ */
05149 {
05150        syntax_highlighter_ini->highlight_comment = INI_STR("highlight.comment");
05151        syntax_highlighter_ini->highlight_default = INI_STR("highlight.default");
05152        syntax_highlighter_ini->highlight_html    = INI_STR("highlight.html");
05153        syntax_highlighter_ini->highlight_keyword = INI_STR("highlight.keyword");
05154        syntax_highlighter_ini->highlight_string  = INI_STR("highlight.string");
05155 }
05156 /* }}} */
05157 
05158 /* {{{ proto bool highlight_file(string file_name [, bool return] )
05159    Syntax highlight a source file */
05160 PHP_FUNCTION(highlight_file)
05161 {
05162        char *filename;
05163        int filename_len;
05164        zend_syntax_highlighter_ini syntax_highlighter_ini;
05165        zend_bool i = 0;
05166 
05167        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &filename, &filename_len, &i) == FAILURE) {
05168               RETURN_FALSE;
05169        }
05170 
05171        if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
05172               RETURN_FALSE;
05173        }
05174 
05175        if (php_check_open_basedir(filename TSRMLS_CC)) {
05176               RETURN_FALSE;
05177        }
05178 
05179        if (strlen(filename) != filename_len) {
05180               RETURN_FALSE;
05181        }
05182 
05183        if (i) {
05184               php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC);
05185        }
05186 
05187        php_get_highlight_struct(&syntax_highlighter_ini);
05188 
05189        if (highlight_file(filename, &syntax_highlighter_ini TSRMLS_CC) == FAILURE) {
05190               if (i) {
05191                      int res = php_ob_get_buffer(return_value TSRMLS_CC);
05192 
05193                      /* flush the buffer only if there is something to flush */
05194                      if (res == SUCCESS && Z_STRLEN_P(return_value) > 0) {
05195                             php_end_ob_buffer (1, 0 TSRMLS_CC);
05196                             zval_dtor(return_value);
05197                      } else {
05198                             php_end_ob_buffer (0, 0 TSRMLS_CC);
05199                             if (res == SUCCESS) {
05200                                    zval_dtor(return_value);
05201                             }
05202                      }
05203               }
05204               RETURN_FALSE;
05205        }
05206 
05207        if (i) {
05208               php_ob_get_buffer (return_value TSRMLS_CC);
05209               php_end_ob_buffer (0, 0 TSRMLS_CC);
05210        } else {
05211               RETURN_TRUE;
05212        }
05213 }
05214 /* }}} */
05215 
05216 /* {{{ proto string php_strip_whitespace(string file_name)
05217    Return source with stripped comments and whitespace */
05218 PHP_FUNCTION(php_strip_whitespace)
05219 {
05220        char *filename;
05221        int filename_len;
05222        zend_lex_state original_lex_state;
05223        zend_file_handle file_handle = {0};
05224 
05225        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
05226               RETURN_FALSE;
05227        }
05228 
05229        if (strlen(filename) != filename_len) {
05230               RETURN_FALSE;
05231        }
05232 
05233        file_handle.type = ZEND_HANDLE_FILENAME;
05234        file_handle.filename = filename;
05235        file_handle.free_filename = 0;
05236        file_handle.opened_path = NULL;
05237        zend_save_lexical_state(&original_lex_state TSRMLS_CC);
05238        if (open_file_for_scanning(&file_handle TSRMLS_CC)==FAILURE) {
05239               zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
05240               RETURN_EMPTY_STRING();
05241        }
05242 
05243        php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
05244 
05245        zend_strip(TSRMLS_C);
05246 
05247        zend_destroy_file_handle(&file_handle TSRMLS_CC);
05248        zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
05249 
05250        php_ob_get_buffer(return_value TSRMLS_CC);
05251        php_end_ob_buffer(0, 0 TSRMLS_CC);
05252 }
05253 /* }}} */
05254 
05255 /* {{{ proto bool highlight_string(string string [, bool return] )
05256    Syntax highlight a string or optionally return it */
05257 PHP_FUNCTION(highlight_string)
05258 {
05259        zval **expr;
05260        zend_syntax_highlighter_ini syntax_highlighter_ini;
05261        char *hicompiled_string_description;
05262        zend_bool i = 0;
05263        int old_error_reporting = EG(error_reporting);
05264 
05265        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|b", &expr, &i) == FAILURE) {
05266               RETURN_FALSE;
05267        }
05268        convert_to_string_ex(expr);
05269 
05270        if (i) {
05271               php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC);
05272        }
05273 
05274        EG(error_reporting) = E_ERROR;
05275 
05276        php_get_highlight_struct(&syntax_highlighter_ini);
05277 
05278        hicompiled_string_description = zend_make_compiled_string_description("highlighted code" TSRMLS_CC);
05279 
05280        if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description TSRMLS_CC) == FAILURE) {
05281               efree(hicompiled_string_description);
05282               EG(error_reporting) = old_error_reporting;
05283               if (i) {
05284                      php_end_ob_buffer (1, 0 TSRMLS_CC);
05285               }
05286               RETURN_FALSE;
05287        }
05288        efree(hicompiled_string_description);
05289 
05290        EG(error_reporting) = old_error_reporting;
05291 
05292        if (i) {
05293               php_ob_get_buffer (return_value TSRMLS_CC);
05294               php_end_ob_buffer (0, 0 TSRMLS_CC);
05295        } else {
05296               RETURN_TRUE;
05297        }
05298 }
05299 /* }}} */
05300 
05301 /* {{{ proto string ini_get(string varname)
05302    Get a configuration option */
05303 PHP_FUNCTION(ini_get)
05304 {
05305        char *varname, *str;
05306        int varname_len;
05307 
05308        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
05309               return;
05310        }
05311 
05312        str = zend_ini_string(varname, varname_len + 1, 0);
05313 
05314        if (!str) {
05315               RETURN_FALSE;
05316        }
05317 
05318        RETURN_STRING(str, 1);
05319 }
05320 /* }}} */
05321 
05322 static int php_ini_get_option(zend_ini_entry *ini_entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
05323 {
05324        zval *ini_array = va_arg(args, zval *);
05325        int module_number = va_arg(args, int);
05326        int details = va_arg(args, int);
05327        zval *option;
05328 
05329        if (module_number != 0 && ini_entry->module_number != module_number) {
05330               return 0;
05331        }
05332 
05333        if (hash_key->nKeyLength == 0 ||
05334               hash_key->arKey[0] != 0
05335        ) {
05336               if (details) {
05337                      MAKE_STD_ZVAL(option);
05338                      array_init(option);
05339 
05340                      if (ini_entry->orig_value) {
05341                             add_assoc_stringl(option, "global_value", ini_entry->orig_value, ini_entry->orig_value_length, 1);
05342                      } else if (ini_entry->value) {
05343                             add_assoc_stringl(option, "global_value", ini_entry->value, ini_entry->value_length, 1);
05344                      } else {
05345                             add_assoc_null(option, "global_value");
05346                      }
05347 
05348                      if (ini_entry->value) {
05349                             add_assoc_stringl(option, "local_value", ini_entry->value, ini_entry->value_length, 1);
05350                      } else {
05351                             add_assoc_null(option, "local_value");
05352                      }
05353 
05354                      add_assoc_long(option, "access", ini_entry->modifiable);
05355 
05356                      add_assoc_zval_ex(ini_array, ini_entry->name, ini_entry->name_length, option);
05357               } else {
05358                      if (ini_entry->value) {
05359                             add_assoc_stringl(ini_array, ini_entry->name, ini_entry->value, ini_entry->value_length, 1);
05360                      } else {
05361                             add_assoc_null(ini_array, ini_entry->name);
05362                      }
05363               }
05364        }
05365        return 0;
05366 }
05367 /* }}} */
05368 
05369 /* {{{ proto array ini_get_all([string extension[, bool details = true]])
05370    Get all configuration options */
05371 PHP_FUNCTION(ini_get_all)
05372 {
05373        char *extname = NULL;
05374        int extname_len = 0, extnumber = 0;
05375        zend_module_entry *module;
05376        zend_bool details = 1;
05377 
05378        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &extname, &extname_len, &details) == FAILURE) {
05379               return;
05380        }
05381 
05382        zend_ini_sort_entries(TSRMLS_C);
05383 
05384        if (extname) {
05385               if (zend_hash_find(&module_registry, extname, extname_len+1, (void **) &module) == FAILURE) {
05386                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find extension '%s'", extname);
05387                      RETURN_FALSE;
05388               }
05389               extnumber = module->module_number;
05390        }
05391 
05392        array_init(return_value);
05393        zend_hash_apply_with_arguments(EG(ini_directives) TSRMLS_CC, (apply_func_args_t) php_ini_get_option, 2, return_value, extnumber, details);
05394 }
05395 /* }}} */
05396 
05397 static int php_ini_check_path(char *option_name, int option_len, char *new_option_name, int new_option_len) /* {{{ */
05398 {
05399        if (option_len != (new_option_len - 1)) {
05400               return 0;
05401        }
05402 
05403        return !strncmp(option_name, new_option_name, option_len);
05404 }
05405 /* }}} */
05406 
05407 /* {{{ proto string ini_set(string varname, string newvalue)
05408    Set a configuration option, returns false on error and the old value of the configuration option on success */
05409 PHP_FUNCTION(ini_set)
05410 {
05411        char *varname, *new_value;
05412        int varname_len, new_value_len;
05413        char *old_value;
05414 
05415        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &varname, &varname_len, &new_value, &new_value_len) == FAILURE) {
05416               return;
05417        }
05418 
05419        old_value = zend_ini_string(varname, varname_len + 1, 0);
05420 
05421        /* copy to return here, because alter might free it! */
05422        if (old_value) {
05423               RETVAL_STRING(old_value, 1);
05424        } else {
05425               RETVAL_FALSE;
05426        }
05427 
05428 #define _CHECK_PATH(var, var_len, ini) php_ini_check_path(var, var_len, ini, sizeof(ini))
05429        /* safe_mode & basedir check */
05430        if (PG(safe_mode) || PG(open_basedir)) {
05431               if (_CHECK_PATH(varname, varname_len, "error_log") ||
05432                      _CHECK_PATH(varname, varname_len, "java.class.path") ||
05433                      _CHECK_PATH(varname, varname_len, "java.home") ||
05434                      _CHECK_PATH(varname, varname_len, "mail.log") ||
05435                      _CHECK_PATH(varname, varname_len, "java.library.path") ||
05436                      _CHECK_PATH(varname, varname_len, "vpopmail.directory")) {
05437                      if (PG(safe_mode) && (!php_checkuid(new_value, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
05438                             zval_dtor(return_value);
05439                             RETURN_FALSE;
05440                      }
05441                      if (php_check_open_basedir(new_value TSRMLS_CC)) {
05442                             zval_dtor(return_value);
05443                             RETURN_FALSE;
05444                      }
05445               }
05446        }
05447 
05448        /* checks that ensure the user does not overwrite certain ini settings when safe_mode is enabled */
05449        if (PG(safe_mode)) {
05450               if (!strncmp("max_execution_time", varname, sizeof("max_execution_time")) ||
05451                      !strncmp("memory_limit", varname, sizeof("memory_limit")) ||
05452                      !strncmp("child_terminate", varname, sizeof("child_terminate"))
05453               ) {
05454                      zval_dtor(return_value);
05455                      RETURN_FALSE;
05456               }
05457        }
05458 
05459        if (zend_alter_ini_entry_ex(varname, varname_len + 1, new_value, new_value_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == FAILURE) {
05460               zval_dtor(return_value);
05461               RETURN_FALSE;
05462        }
05463 }
05464 /* }}} */
05465 
05466 /* {{{ proto void ini_restore(string varname)
05467    Restore the value of a configuration option specified by varname */
05468 PHP_FUNCTION(ini_restore)
05469 {
05470        char *varname;
05471        int varname_len;
05472 
05473        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
05474               return;
05475        }
05476 
05477        zend_restore_ini_entry(varname, varname_len+1, PHP_INI_STAGE_RUNTIME);
05478 }
05479 /* }}} */
05480 
05481 /* {{{ proto string set_include_path(string new_include_path)
05482    Sets the include_path configuration option */
05483 PHP_FUNCTION(set_include_path)
05484 {
05485        char *new_value;
05486        int new_value_len;
05487        char *old_value;
05488 
05489        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &new_value, &new_value_len) == FAILURE) {
05490               return;
05491        }
05492 
05493        /* No nulls allowed in paths */
05494        if (strlen(new_value) != new_value_len) {
05495               RETURN_FALSE;
05496        }
05497 
05498        old_value = zend_ini_string("include_path", sizeof("include_path"), 0);
05499        /* copy to return here, because alter might free it! */
05500        if (old_value) {
05501               RETVAL_STRING(old_value, 1);
05502        } else {
05503               RETVAL_FALSE;
05504        }
05505 
05506        if (zend_alter_ini_entry_ex("include_path", sizeof("include_path"), new_value, new_value_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == FAILURE) {
05507               zval_dtor(return_value);
05508               RETURN_FALSE;
05509        }
05510 }
05511 /* }}} */
05512 
05513 /* {{{ proto string get_include_path()
05514    Get the current include_path configuration option */
05515 PHP_FUNCTION(get_include_path)
05516 {
05517        char *str;
05518 
05519        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
05520               return;
05521        }
05522 
05523        str = zend_ini_string("include_path", sizeof("include_path"), 0);
05524 
05525        if (str == NULL) {
05526               RETURN_FALSE;
05527        }
05528 
05529        RETURN_STRING(str, 1);
05530 }
05531 /* }}} */
05532 
05533 /* {{{ proto void restore_include_path()
05534    Restore the value of the include_path configuration option */
05535 PHP_FUNCTION(restore_include_path)
05536 {
05537        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
05538               return;
05539        }
05540        zend_restore_ini_entry("include_path", sizeof("include_path"), PHP_INI_STAGE_RUNTIME);
05541 }
05542 /* }}} */
05543 
05544 /* {{{ proto mixed print_r(mixed var [, bool return])
05545    Prints out or returns information about the specified variable */
05546 PHP_FUNCTION(print_r)
05547 {
05548        zval *var;
05549        zend_bool do_return = 0;
05550 
05551        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &do_return) == FAILURE) {
05552               RETURN_FALSE;
05553        }
05554 
05555        if (do_return) {
05556               php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC);
05557        }
05558 
05559        zend_print_zval_r(var, 0 TSRMLS_CC);
05560 
05561        if (do_return) {
05562               php_ob_get_buffer (return_value TSRMLS_CC);
05563               php_end_ob_buffer (0, 0 TSRMLS_CC);
05564        } else {
05565               RETURN_TRUE;
05566        }
05567 }
05568 /* }}} */
05569 
05570 /* {{{ proto int connection_aborted(void)
05571    Returns true if client disconnected */
05572 PHP_FUNCTION(connection_aborted)
05573 {
05574        RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED);
05575 }
05576 /* }}} */
05577 
05578 /* {{{ proto int connection_status(void)
05579    Returns the connection status bitfield */
05580 PHP_FUNCTION(connection_status)
05581 {
05582        RETURN_LONG(PG(connection_status));
05583 }
05584 /* }}} */
05585 
05586 /* {{{ proto int ignore_user_abort([string value])
05587    Set whether we want to ignore a user abort event or not */
05588 PHP_FUNCTION(ignore_user_abort)
05589 {
05590        char *arg = NULL;
05591        int arg_len = 0;
05592        int old_setting;
05593 
05594        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &arg, &arg_len) == FAILURE) {
05595               return;
05596        }
05597 
05598        old_setting = PG(ignore_user_abort);
05599 
05600        if (arg) {
05601               zend_alter_ini_entry_ex("ignore_user_abort", sizeof("ignore_user_abort"), arg, arg_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
05602        }
05603 
05604        RETURN_LONG(old_setting);
05605 }
05606 /* }}} */
05607 
05608 #if HAVE_GETSERVBYNAME
05609 /* {{{ proto int getservbyname(string service, string protocol)
05610    Returns port associated with service. Protocol must be "tcp" or "udp" */
05611 PHP_FUNCTION(getservbyname)
05612 {
05613        char *name, *proto;
05614        int name_len, proto_len;
05615        struct servent *serv;
05616 
05617        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &proto, &proto_len) == FAILURE) {
05618               return;
05619        }
05620 
05621 
05622 /* empty string behaves like NULL on windows implementation of 
05623    getservbyname. Let be portable instead. */
05624 #ifdef PHP_WIN32
05625        if (proto_len == 0) {
05626               RETURN_FALSE;
05627        }
05628 #endif
05629 
05630        serv = getservbyname(name, proto);
05631 
05632        if (serv == NULL) {
05633               RETURN_FALSE;
05634        }
05635 
05636        RETURN_LONG(ntohs(serv->s_port));
05637 }
05638 /* }}} */
05639 #endif
05640 
05641 #if HAVE_GETSERVBYPORT
05642 /* {{{ proto string getservbyport(int port, string protocol)
05643    Returns service name associated with port. Protocol must be "tcp" or "udp" */
05644 PHP_FUNCTION(getservbyport)
05645 {
05646        char *proto;
05647        int proto_len;
05648        long port;
05649        struct servent *serv;
05650 
05651        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &port, &proto, &proto_len) == FAILURE) {
05652               return;
05653        }
05654 
05655        serv = getservbyport(htons((unsigned short) port), proto);
05656 
05657        if (serv == NULL) {
05658               RETURN_FALSE;
05659        }
05660 
05661        RETURN_STRING(serv->s_name, 1);
05662 }
05663 /* }}} */
05664 #endif
05665 
05666 #if HAVE_GETPROTOBYNAME
05667 /* {{{ proto int getprotobyname(string name)
05668    Returns protocol number associated with name as per /etc/protocols */
05669 PHP_FUNCTION(getprotobyname)
05670 {
05671        char *name;
05672        int name_len;
05673        struct protoent *ent;
05674 
05675        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
05676               return;
05677        }
05678 
05679        ent = getprotobyname(name);
05680 
05681        if (ent == NULL) {
05682               RETURN_FALSE;
05683        }
05684 
05685        RETURN_LONG(ent->p_proto);
05686 }
05687 /* }}} */
05688 #endif
05689 
05690 #if HAVE_GETPROTOBYNUMBER
05691 /* {{{ proto string getprotobynumber(int proto)
05692    Returns protocol name associated with protocol number proto */
05693 PHP_FUNCTION(getprotobynumber)
05694 {
05695        long proto;
05696        struct protoent *ent;
05697 
05698        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &proto) == FAILURE) {
05699               return;
05700        }
05701 
05702        ent = getprotobynumber(proto);
05703 
05704        if (ent == NULL) {
05705               RETURN_FALSE;
05706        }
05707 
05708        RETURN_STRING(ent->p_name, 1);
05709 }
05710 /* }}} */
05711 #endif
05712 
05713 /* {{{ proto bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])
05714    Registers a tick callback function */
05715 PHP_FUNCTION(register_tick_function)
05716 {
05717        user_tick_function_entry tick_fe;
05718        int i;
05719        char *function_name = NULL;
05720 
05721        tick_fe.calling = 0;
05722        tick_fe.arg_count = ZEND_NUM_ARGS();
05723 
05724        if (tick_fe.arg_count < 1) {
05725               WRONG_PARAM_COUNT;
05726        }
05727 
05728        tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
05729 
05730        if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
05731               efree(tick_fe.arguments);
05732               RETURN_FALSE;
05733        }
05734 
05735        if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name TSRMLS_CC)) {
05736               efree(tick_fe.arguments);
05737               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid tick callback '%s' passed", function_name);
05738               efree(function_name);
05739               RETURN_FALSE;
05740        } else if (function_name) {
05741               efree(function_name);
05742        }
05743 
05744        if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY && Z_TYPE_P(tick_fe.arguments[0]) != IS_OBJECT) {
05745               convert_to_string_ex(&tick_fe.arguments[0]);
05746        }
05747 
05748        if (!BG(user_tick_functions)) {
05749               BG(user_tick_functions) = (zend_llist *) emalloc(sizeof(zend_llist));
05750               zend_llist_init(BG(user_tick_functions),
05751                                           sizeof(user_tick_function_entry),
05752                                           (llist_dtor_func_t) user_tick_function_dtor, 0);
05753               php_add_tick_function(run_user_tick_functions);
05754        }
05755 
05756        for (i = 0; i < tick_fe.arg_count; i++) {
05757               Z_ADDREF_P(tick_fe.arguments[i]);
05758        }
05759 
05760        zend_llist_add_element(BG(user_tick_functions), &tick_fe);
05761 
05762        RETURN_TRUE;
05763 }
05764 /* }}} */
05765 
05766 /* {{{ proto void unregister_tick_function(string function_name)
05767    Unregisters a tick callback function */
05768 PHP_FUNCTION(unregister_tick_function)
05769 {
05770        zval *function;
05771        user_tick_function_entry tick_fe;
05772 
05773        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &function) == FAILURE) {
05774               return;
05775        }
05776 
05777        if (!BG(user_tick_functions)) {
05778               return;
05779        }
05780 
05781        if (Z_TYPE_P(function) != IS_ARRAY) {
05782               convert_to_string(function);
05783        }
05784 
05785        tick_fe.arguments = (zval **) emalloc(sizeof(zval *));
05786        tick_fe.arguments[0] = function;
05787        tick_fe.arg_count = 1;
05788        zend_llist_del_element(BG(user_tick_functions), &tick_fe, (int (*)(void *, void *)) user_tick_function_compare);
05789        efree(tick_fe.arguments);
05790 }
05791 /* }}} */
05792 
05793 /* {{{ proto bool is_uploaded_file(string path)
05794    Check if file was created by rfc1867 upload */
05795 PHP_FUNCTION(is_uploaded_file)
05796 {
05797        char *path;
05798        int path_len;
05799 
05800        if (!SG(rfc1867_uploaded_files)) {
05801               RETURN_FALSE;
05802        }
05803 
05804        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) {
05805               return;
05806        }
05807 
05808        if (strlen(path) != path_len) {
05809               RETURN_FALSE;
05810        }
05811 
05812        if (zend_hash_exists(SG(rfc1867_uploaded_files), path, path_len + 1)) {
05813               RETURN_TRUE;
05814        } else {
05815               RETURN_FALSE;
05816        }
05817 }
05818 /* }}} */
05819 
05820 /* {{{ proto bool move_uploaded_file(string path, string new_path)
05821    Move a file if and only if it was created by an upload */
05822 PHP_FUNCTION(move_uploaded_file)
05823 {
05824        char *path, *new_path;
05825        int path_len, new_path_len;
05826        zend_bool successful = 0;
05827 
05828 #ifndef PHP_WIN32
05829        int oldmask; int ret;
05830 #endif
05831 
05832        if (!SG(rfc1867_uploaded_files)) {
05833               RETURN_FALSE;
05834        }
05835 
05836        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &path, &path_len, &new_path, &new_path_len) == FAILURE) {
05837               return;
05838        }
05839 
05840        if (!zend_hash_exists(SG(rfc1867_uploaded_files), path, path_len + 1)) {
05841               RETURN_FALSE;
05842        }
05843 
05844        if (PG(safe_mode) && (!php_checkuid(new_path, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
05845               RETURN_FALSE;
05846        }
05847 
05848        if (php_check_open_basedir(new_path TSRMLS_CC)) {
05849               RETURN_FALSE;
05850        }
05851 
05852        if (strlen(path) != path_len) {
05853               RETURN_FALSE;
05854        }
05855 
05856        if (strlen(new_path) != new_path_len) {
05857               RETURN_FALSE;
05858        }
05859 
05860        if (VCWD_RENAME(path, new_path) == 0) {
05861               successful = 1;
05862 #ifndef PHP_WIN32
05863               oldmask = umask(077);
05864               umask(oldmask);
05865 
05866               ret = VCWD_CHMOD(new_path, 0666 & ~oldmask);
05867 
05868               if (ret == -1) {
05869                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
05870               }
05871 #endif
05872        } else if (php_copy_file_ex(path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) {
05873               VCWD_UNLINK(path);
05874               successful = 1;
05875        }
05876 
05877        if (successful) {
05878               zend_hash_del(SG(rfc1867_uploaded_files), path, path_len + 1);
05879        } else {
05880               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to move '%s' to '%s'", path, new_path);
05881        }
05882 
05883        RETURN_BOOL(successful);
05884 }
05885 /* }}} */
05886 
05887 /* {{{ php_simple_ini_parser_cb
05888  */
05889 static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_type, zval *arr TSRMLS_DC)
05890 {
05891        zval *element;
05892 
05893        switch (callback_type) {
05894 
05895               case ZEND_INI_PARSER_ENTRY:
05896                      if (!arg2) {
05897                             /* bare string - nothing to do */
05898                             break;
05899                      }
05900                      ALLOC_ZVAL(element);
05901                      MAKE_COPY_ZVAL(&arg2, element);
05902                      zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &element, sizeof(zval *), NULL);
05903                      break;
05904 
05905               case ZEND_INI_PARSER_POP_ENTRY:
05906               {
05907                      zval *hash, **find_hash;
05908 
05909                      if (!arg2) {
05910                             /* bare string - nothing to do */
05911                             break;
05912                      }
05913 
05914                      if (!(Z_STRLEN_P(arg1) > 1 && Z_STRVAL_P(arg1)[0] == '0') && is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == IS_LONG) {
05915                             ulong key = (ulong) zend_atol(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
05916                             if (zend_hash_index_find(Z_ARRVAL_P(arr), key, (void **) &find_hash) == FAILURE) {
05917                                    ALLOC_ZVAL(hash);
05918                                    INIT_PZVAL(hash);
05919                                    array_init(hash);
05920 
05921                                    zend_hash_index_update(Z_ARRVAL_P(arr), key, &hash, sizeof(zval *), NULL);
05922                             } else {
05923                                    hash = *find_hash;
05924                             }
05925                      } else {
05926                             if (zend_hash_find(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void **) &find_hash) == FAILURE) {
05927                                    ALLOC_ZVAL(hash);
05928                                    INIT_PZVAL(hash);
05929                                    array_init(hash);
05930 
05931                                    zend_hash_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &hash, sizeof(zval *), NULL);
05932                             } else {
05933                                    hash = *find_hash;
05934                             }
05935                      }
05936 
05937                      if (Z_TYPE_P(hash) != IS_ARRAY) {
05938                             zval_dtor(hash);
05939                             INIT_PZVAL(hash);
05940                             array_init(hash);
05941                      }
05942 
05943                      ALLOC_ZVAL(element);
05944                      MAKE_COPY_ZVAL(&arg2, element);
05945 
05946                      if (arg3 && Z_STRLEN_P(arg3) > 0) {
05947                             add_assoc_zval_ex(hash, Z_STRVAL_P(arg3), Z_STRLEN_P(arg3) + 1, element);
05948                      } else {
05949                             add_next_index_zval(hash, element);
05950                      }
05951               }
05952               break;
05953 
05954               case ZEND_INI_PARSER_SECTION:
05955                      break;
05956        }
05957 }
05958 /* }}} */
05959 
05960 /* {{{ php_ini_parser_cb_with_sections
05961  */
05962 static void php_ini_parser_cb_with_sections(zval *arg1, zval *arg2, zval *arg3, int callback_type, zval *arr TSRMLS_DC)
05963 {
05964        if (callback_type == ZEND_INI_PARSER_SECTION) {
05965               MAKE_STD_ZVAL(BG(active_ini_file_section));
05966               array_init(BG(active_ini_file_section));
05967               zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &BG(active_ini_file_section), sizeof(zval *), NULL);
05968        } else if (arg2) {
05969               zval *active_arr;
05970 
05971               if (BG(active_ini_file_section)) {
05972                      active_arr = BG(active_ini_file_section);
05973               } else {
05974                      active_arr = arr;
05975               }
05976 
05977               php_simple_ini_parser_cb(arg1, arg2, arg3, callback_type, active_arr TSRMLS_CC);
05978        }
05979 }
05980 /* }}} */
05981 
05982 /* {{{ proto array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])
05983    Parse configuration file */
05984 PHP_FUNCTION(parse_ini_file)
05985 {
05986        char *filename = NULL;
05987        int filename_len = 0;
05988        zend_bool process_sections = 0;
05989        long scanner_mode = ZEND_INI_SCANNER_NORMAL;
05990        zend_file_handle fh;
05991        zend_ini_parser_cb_t ini_parser_cb;
05992 
05993        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &filename, &filename_len, &process_sections, &scanner_mode) == FAILURE) {
05994               RETURN_FALSE;
05995        }
05996 
05997        if (filename_len == 0) {
05998               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filename cannot be empty!");
05999               RETURN_FALSE;
06000        }
06001 
06002        if (strlen(filename) != filename_len) {
06003               RETURN_FALSE;
06004        }
06005 
06006        /* Set callback function */
06007        if (process_sections) {
06008               BG(active_ini_file_section) = NULL;
06009               ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
06010        } else {
06011               ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
06012        }
06013 
06014        /* Setup filehandle */
06015        memset(&fh, 0, sizeof(fh));
06016        fh.filename = filename;
06017        fh.type = ZEND_HANDLE_FILENAME;
06018 
06019        array_init(return_value);
06020        if (zend_parse_ini_file(&fh, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) {
06021               zend_hash_destroy(Z_ARRVAL_P(return_value));
06022               efree(Z_ARRVAL_P(return_value));
06023               RETURN_FALSE;
06024        }
06025 }
06026 /* }}} */
06027 
06028 /* {{{ proto array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])
06029    Parse configuration string */
06030 PHP_FUNCTION(parse_ini_string)
06031 {
06032        char *string = NULL, *str = NULL;
06033        int str_len = 0;
06034        zend_bool process_sections = 0;
06035        long scanner_mode = ZEND_INI_SCANNER_NORMAL;
06036        zend_ini_parser_cb_t ini_parser_cb;
06037 
06038        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) {
06039               RETURN_FALSE;
06040        }
06041 
06042        if (INT_MAX - str_len < ZEND_MMAP_AHEAD) {
06043               RETVAL_FALSE;
06044        }
06045 
06046        /* Set callback function */
06047        if (process_sections) {
06048               BG(active_ini_file_section) = NULL;
06049               ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
06050        } else {
06051               ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
06052        }
06053 
06054        /* Setup string */
06055        string = (char *) emalloc(str_len + ZEND_MMAP_AHEAD);
06056        memcpy(string, str, str_len);
06057        memset(string + str_len, 0, ZEND_MMAP_AHEAD);
06058 
06059        array_init(return_value);
06060        if (zend_parse_ini_string(string, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) {
06061               zend_hash_destroy(Z_ARRVAL_P(return_value));
06062               efree(Z_ARRVAL_P(return_value));
06063               RETVAL_FALSE;
06064        }
06065        efree(string);
06066 }
06067 /* }}} */
06068 
06069 #if ZEND_DEBUG
06070 /* This function returns an array of ALL valid ini options with values and 
06071  *  is not the same as ini_get_all() which returns only registered ini options. Only useful for devs to debug php.ini scanner/parser! */
06072 PHP_FUNCTION(config_get_hash) /* {{{ */
06073 {
06074        HashTable *hash = php_ini_get_configuration_hash();
06075 
06076        array_init(return_value);
06077        zend_hash_apply_with_arguments(hash TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, return_value);
06078 }
06079 /* }}} */
06080 #endif
06081 
06082 static int copy_request_variable(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
06083 {
06084        zval *prefix, new_key;
06085        int prefix_len;
06086        zval **var = (zval **) pDest;
06087 
06088        if (num_args != 1) {
06089               return 0;
06090        }
06091 
06092        prefix = va_arg(args, zval *);
06093        prefix_len = Z_STRLEN_P(prefix);
06094 
06095        if (!prefix_len && !hash_key->nKeyLength) {
06096               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard");
06097               return 0;
06098        }
06099 
06100        if (hash_key->nKeyLength) {
06101               php_prefix_varname(&new_key, prefix, hash_key->arKey, hash_key->nKeyLength - 1, 0 TSRMLS_CC);
06102        } else {
06103               zval num;
06104 
06105               ZVAL_LONG(&num, hash_key->h);
06106               convert_to_string(&num);
06107               php_prefix_varname(&new_key, prefix, Z_STRVAL(num), Z_STRLEN(num), 0 TSRMLS_CC);
06108               zval_dtor(&num);
06109        }
06110 
06111        if (php_varname_check(Z_STRVAL(new_key), Z_STRLEN(new_key), 0 TSRMLS_CC) == FAILURE) {
06112               zval_dtor(&new_key);
06113               return 0;
06114        }
06115 
06116        zend_delete_global_variable(Z_STRVAL(new_key), Z_STRLEN(new_key) TSRMLS_CC);
06117        ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), Z_STRVAL(new_key), Z_STRLEN(new_key) + 1, *var, Z_REFCOUNT_PP(var) + 1, 0);
06118 
06119        zval_dtor(&new_key);
06120        return 0;
06121 }
06122 /* }}} */
06123 
06124 /* {{{ proto bool import_request_variables(string types [, string prefix])
06125    Import GET/POST/Cookie variables into the global scope */
06126 PHP_FUNCTION(import_request_variables)
06127 {
06128        char *types;
06129        int types_len;
06130        zval *prefix = NULL;
06131        char *p;
06132        zend_bool ok = 0;
06133 
06134        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &types, &types_len, &prefix) == FAILURE) {
06135               return;
06136        }
06137 
06138        if (ZEND_NUM_ARGS() > 1) {
06139               convert_to_string(prefix);
06140 
06141               if (Z_STRLEN_P(prefix) == 0) {
06142                      php_error_docref(NULL TSRMLS_CC, E_NOTICE, "No prefix specified - possible security hazard");
06143               }
06144        } else {
06145               MAKE_STD_ZVAL(prefix);
06146               ZVAL_EMPTY_STRING(prefix);
06147        }
06148 
06149        for (p = types; p && *p; p++) {
06150               switch (*p) {
06151 
06152                      case 'g':
06153                      case 'G':
06154                             zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
06155                             ok = 1;
06156                             break;
06157 
06158                      case 'p':
06159                      case 'P':
06160                             zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
06161                             zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_FILES]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
06162                             ok = 1;
06163                             break;
06164 
06165                      case 'c':
06166                      case 'C':
06167                             zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
06168                             ok = 1;
06169                             break;
06170               }
06171        }
06172 
06173        if (ZEND_NUM_ARGS() < 2) {
06174               zval_ptr_dtor(&prefix);
06175        }
06176        RETURN_BOOL(ok);
06177 }
06178 /* }}} */
06179 
06180 #ifdef HAVE_GETLOADAVG
06181 /* {{{ proto array sys_getloadavg()
06182 */
06183 PHP_FUNCTION(sys_getloadavg)
06184 {
06185        double load[3];
06186 
06187        if (getloadavg(load, 3) == -1) {
06188               RETURN_FALSE;
06189        } else {
06190               array_init(return_value);
06191               add_index_double(return_value, 0, load[0]);
06192               add_index_double(return_value, 1, load[1]);
06193               add_index_double(return_value, 2, load[2]);
06194        }
06195 }
06196 /* }}} */
06197 #endif
06198 
06199 /*
06200  * Local variables:
06201  * tab-width: 4
06202  * c-basic-offset: 4
06203  * End:
06204  * vim600: fdm=marker
06205  * vim: noet sw=4 ts=4
06206  */