PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/standard - basic_functions.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 929 1077 86.3 %
Date: 2014-08-04 Functions: 75 82 91.5 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 5                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1997-2014 The PHP Group                                |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 3.01 of the PHP license,      |
       8             :    | that is bundled with this package in the file LICENSE, and is        |
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.php.net/license/3_01.txt                                  |
      11             :    | If you did not receive a copy of the PHP license and are unable to   |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@php.net so we can mail you a copy immediately.               |
      14             :    +----------------------------------------------------------------------+
      15             :    | Authors: Andi Gutmans <andi@zend.com>                                |
      16             :    |          Zeev Suraski <zeev@zend.com>                                |
      17             :    +----------------------------------------------------------------------+
      18             :  */
      19             : 
      20             : /* $Id$ */
      21             : 
      22             : #include "php.h"
      23             : #include "php_streams.h"
      24             : #include "php_main.h"
      25             : #include "php_globals.h"
      26             : #include "php_ini.h"
      27             : #include "php_standard.h"
      28             : #include "php_math.h"
      29             : #include "php_http.h"
      30             : #include "php_incomplete_class.h"
      31             : #include "php_getopt.h"
      32             : #include "ext/standard/info.h"
      33             : #include "ext/session/php_session.h"
      34             : #include "zend_operators.h"
      35             : #include "ext/standard/php_dns.h"
      36             : #include "ext/standard/php_uuencode.h"
      37             : 
      38             : #ifdef PHP_WIN32
      39             : #include "win32/php_win32_globals.h"
      40             : #include "win32/time.h"
      41             : #endif
      42             : 
      43             : typedef struct yy_buffer_state *YY_BUFFER_STATE;
      44             : 
      45             : #include "zend.h"
      46             : #include "zend_ini_scanner.h"
      47             : #include "zend_language_scanner.h"
      48             : #include <zend_language_parser.h>
      49             : 
      50             : #include <stdarg.h>
      51             : #include <stdlib.h>
      52             : #include <math.h>
      53             : #include <time.h>
      54             : #include <stdio.h>
      55             : 
      56             : #ifndef PHP_WIN32
      57             : #include <sys/types.h>
      58             : #include <sys/stat.h>
      59             : #endif
      60             : 
      61             : #ifdef NETWARE
      62             : #include <netinet/in.h>
      63             : #endif
      64             : 
      65             : #ifndef PHP_WIN32
      66             : # include <netdb.h>
      67             : #else
      68             : #include "win32/inet.h"
      69             : #endif
      70             : 
      71             : #if HAVE_ARPA_INET_H
      72             : # include <arpa/inet.h>
      73             : #endif
      74             : 
      75             : #if HAVE_UNISTD_H
      76             : # include <unistd.h>
      77             : #endif
      78             : 
      79             : #if HAVE_STRING_H
      80             : # include <string.h>
      81             : #else
      82             : # include <strings.h>
      83             : #endif
      84             : 
      85             : #if HAVE_LOCALE_H
      86             : # include <locale.h>
      87             : #endif
      88             : 
      89             : #if HAVE_SYS_MMAN_H
      90             : # include <sys/mman.h>
      91             : #endif
      92             : 
      93             : #if HAVE_SYS_LOADAVG_H
      94             : # include <sys/loadavg.h>
      95             : #endif
      96             : 
      97             : #ifdef PHP_WIN32
      98             : # include "win32/unistd.h"
      99             : #endif
     100             : 
     101             : #ifndef INADDR_NONE
     102             : #define INADDR_NONE ((unsigned long int) -1)
     103             : #endif
     104             : 
     105             : #include "zend_globals.h"
     106             : #include "php_globals.h"
     107             : #include "SAPI.h"
     108             : #include "php_ticks.h"
     109             : 
     110             : #ifdef ZTS
     111             : PHPAPI int basic_globals_id;
     112             : #else
     113             : PHPAPI php_basic_globals basic_globals;
     114             : #endif
     115             : 
     116             : #include "php_fopen_wrappers.h"
     117             : #include "streamsfuncs.h"
     118             : 
     119             : static zend_class_entry *incomplete_class_entry = NULL;
     120             : 
     121             : typedef struct _user_tick_function_entry {
     122             :         zval **arguments;
     123             :         int arg_count;
     124             :         int calling;
     125             : } user_tick_function_entry;
     126             : 
     127             : /* some prototypes for local functions */
     128             : static void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
     129             : static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry);
     130             : 
     131             : static HashTable basic_submodules;
     132             : 
     133             : #undef sprintf
     134             : 
     135             : /* {{{ arginfo */
     136             : /* {{{ main/main.c */
     137             : ZEND_BEGIN_ARG_INFO(arginfo_set_time_limit, 0)
     138             :         ZEND_ARG_INFO(0, seconds)
     139             : ZEND_END_ARG_INFO()
     140             : /* }}} */
     141             : 
     142             : /* {{{ main/sapi.c */
     143             : ZEND_BEGIN_ARG_INFO(arginfo_header_register_callback, 0)
     144             :         ZEND_ARG_INFO(0, callback)
     145             : ZEND_END_ARG_INFO()
     146             : /* }}} */
     147             : 
     148             : /* {{{ main/output.c */
     149             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_start, 0, 0, 0)
     150             :         ZEND_ARG_INFO(0, user_function)
     151             :         ZEND_ARG_INFO(0, chunk_size)
     152             :         ZEND_ARG_INFO(0, flags)
     153             : ZEND_END_ARG_INFO()
     154             : 
     155             : ZEND_BEGIN_ARG_INFO(arginfo_ob_flush, 0)
     156             : ZEND_END_ARG_INFO()
     157             : 
     158             : ZEND_BEGIN_ARG_INFO(arginfo_ob_clean, 0)
     159             : ZEND_END_ARG_INFO()
     160             : 
     161             : ZEND_BEGIN_ARG_INFO(arginfo_ob_end_flush, 0)
     162             : ZEND_END_ARG_INFO()
     163             : 
     164             : ZEND_BEGIN_ARG_INFO(arginfo_ob_end_clean, 0)
     165             : ZEND_END_ARG_INFO()
     166             : 
     167             : ZEND_BEGIN_ARG_INFO(arginfo_ob_get_flush, 0)
     168             : ZEND_END_ARG_INFO()
     169             : 
     170             : ZEND_BEGIN_ARG_INFO(arginfo_ob_get_clean, 0)
     171             : ZEND_END_ARG_INFO()
     172             : 
     173             : ZEND_BEGIN_ARG_INFO(arginfo_ob_get_contents, 0)
     174             : ZEND_END_ARG_INFO()
     175             : 
     176             : ZEND_BEGIN_ARG_INFO(arginfo_ob_get_level, 0)
     177             : ZEND_END_ARG_INFO()
     178             : 
     179             : ZEND_BEGIN_ARG_INFO(arginfo_ob_get_length, 0)
     180             : ZEND_END_ARG_INFO()
     181             : 
     182             : ZEND_BEGIN_ARG_INFO(arginfo_ob_list_handlers, 0)
     183             : ZEND_END_ARG_INFO()
     184             : 
     185             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_get_status, 0, 0, 0)
     186             :         ZEND_ARG_INFO(0, full_status)
     187             : ZEND_END_ARG_INFO()
     188             : 
     189             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_implicit_flush, 0, 0, 0)
     190             :         ZEND_ARG_INFO(0, flag)
     191             : ZEND_END_ARG_INFO()
     192             : 
     193             : ZEND_BEGIN_ARG_INFO(arginfo_output_reset_rewrite_vars, 0)
     194             : ZEND_END_ARG_INFO()
     195             : 
     196             : ZEND_BEGIN_ARG_INFO(arginfo_output_add_rewrite_var, 0)
     197             :         ZEND_ARG_INFO(0, name)
     198             :         ZEND_ARG_INFO(0, value)
     199             : ZEND_END_ARG_INFO()
     200             : /* }}} */
     201             : /* {{{ main/streams/userspace.c */
     202             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_wrapper_register, 0, 0, 2)
     203             :         ZEND_ARG_INFO(0, protocol)
     204             :         ZEND_ARG_INFO(0, classname)
     205             :         ZEND_ARG_INFO(0, flags)
     206             : ZEND_END_ARG_INFO()
     207             : 
     208             : ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_unregister, 0)
     209             :         ZEND_ARG_INFO(0, protocol)
     210             : ZEND_END_ARG_INFO()
     211             : 
     212             : ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_restore, 0)
     213             :         ZEND_ARG_INFO(0, protocol)
     214             : ZEND_END_ARG_INFO()
     215             : /* }}} */
     216             : /* {{{ array.c */
     217             : ZEND_BEGIN_ARG_INFO_EX(arginfo_krsort, 0, 0, 1)
     218             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     219             :         ZEND_ARG_INFO(0, sort_flags)
     220             : ZEND_END_ARG_INFO()
     221             : 
     222             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ksort, 0, 0, 1)
     223             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     224             :         ZEND_ARG_INFO(0, sort_flags)
     225             : ZEND_END_ARG_INFO()
     226             : 
     227             : ZEND_BEGIN_ARG_INFO_EX(arginfo_count, 0, 0, 1)
     228             :         ZEND_ARG_INFO(0, var)
     229             :         ZEND_ARG_INFO(0, mode)
     230             : ZEND_END_ARG_INFO()
     231             : 
     232             : ZEND_BEGIN_ARG_INFO(arginfo_natsort, 0)
     233             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     234             : ZEND_END_ARG_INFO()
     235             : 
     236             : ZEND_BEGIN_ARG_INFO(arginfo_natcasesort, 0)
     237             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     238             : ZEND_END_ARG_INFO()
     239             : 
     240             : ZEND_BEGIN_ARG_INFO_EX(arginfo_asort, 0, 0, 1)
     241             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     242             :         ZEND_ARG_INFO(0, sort_flags)
     243             : ZEND_END_ARG_INFO()
     244             : 
     245             : ZEND_BEGIN_ARG_INFO_EX(arginfo_arsort, 0, 0, 1)
     246             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     247             :         ZEND_ARG_INFO(0, sort_flags)
     248             : ZEND_END_ARG_INFO()
     249             : 
     250             : ZEND_BEGIN_ARG_INFO_EX(arginfo_sort, 0, 0, 1)
     251             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     252             :         ZEND_ARG_INFO(0, sort_flags)
     253             : ZEND_END_ARG_INFO()
     254             : 
     255             : ZEND_BEGIN_ARG_INFO_EX(arginfo_rsort, 0, 0, 1)
     256             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     257             :         ZEND_ARG_INFO(0, sort_flags)
     258             : ZEND_END_ARG_INFO()
     259             : 
     260             : ZEND_BEGIN_ARG_INFO(arginfo_usort, 0)
     261             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     262             :         ZEND_ARG_INFO(0, cmp_function)
     263             : ZEND_END_ARG_INFO()
     264             : 
     265             : ZEND_BEGIN_ARG_INFO(arginfo_uasort, 0)
     266             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     267             :         ZEND_ARG_INFO(0, cmp_function)
     268             : ZEND_END_ARG_INFO()
     269             : 
     270             : ZEND_BEGIN_ARG_INFO(arginfo_uksort, 0)
     271             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     272             :         ZEND_ARG_INFO(0, cmp_function)
     273             : ZEND_END_ARG_INFO()
     274             : 
     275             : ZEND_BEGIN_ARG_INFO(arginfo_end, 0)
     276             :         ZEND_ARG_INFO(1, arg)
     277             : ZEND_END_ARG_INFO()
     278             : 
     279             : ZEND_BEGIN_ARG_INFO(arginfo_prev, 0)
     280             :         ZEND_ARG_INFO(1, arg)
     281             : ZEND_END_ARG_INFO()
     282             : 
     283             : ZEND_BEGIN_ARG_INFO(arginfo_next, 0)
     284             :         ZEND_ARG_INFO(1, arg)
     285             : ZEND_END_ARG_INFO()
     286             : 
     287             : ZEND_BEGIN_ARG_INFO(arginfo_reset, 0)
     288             :         ZEND_ARG_INFO(1, arg)
     289             : ZEND_END_ARG_INFO()
     290             : 
     291             : ZEND_BEGIN_ARG_INFO(arginfo_current, 0)
     292             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
     293             : ZEND_END_ARG_INFO()
     294             : 
     295             : ZEND_BEGIN_ARG_INFO(arginfo_key, 0)
     296             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
     297             : ZEND_END_ARG_INFO()
     298             : 
     299             : ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1)
     300             :         ZEND_ARG_VARIADIC_INFO(0, args)
     301             : ZEND_END_ARG_INFO()
     302             : 
     303             : ZEND_BEGIN_ARG_INFO_EX(arginfo_max, 0, 0, 1)
     304             :         ZEND_ARG_VARIADIC_INFO(0, args)
     305             : ZEND_END_ARG_INFO()
     306             : 
     307             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk, 0, 0, 2)
     308             :         ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */
     309             :         ZEND_ARG_INFO(0, funcname)
     310             :         ZEND_ARG_INFO(0, userdata)
     311             : ZEND_END_ARG_INFO()
     312             : 
     313             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_walk_recursive, 0, 0, 2)
     314             :         ZEND_ARG_INFO(1, input) /* ARRAY_INFO(1, arg, 0) */
     315             :         ZEND_ARG_INFO(0, funcname)
     316             :         ZEND_ARG_INFO(0, userdata)
     317             : ZEND_END_ARG_INFO()
     318             : 
     319             : ZEND_BEGIN_ARG_INFO_EX(arginfo_in_array, 0, 0, 2)
     320             :         ZEND_ARG_INFO(0, needle)
     321             :         ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */
     322             :         ZEND_ARG_INFO(0, strict)
     323             : ZEND_END_ARG_INFO()
     324             : 
     325             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_search, 0, 0, 2)
     326             :         ZEND_ARG_INFO(0, needle)
     327             :         ZEND_ARG_INFO(0, haystack) /* ARRAY_INFO(0, haystack, 0) */
     328             :         ZEND_ARG_INFO(0, strict)
     329             : ZEND_END_ARG_INFO()
     330             : 
     331             : ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1)
     332             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */
     333             :         ZEND_ARG_INFO(0, extract_type)
     334             :         ZEND_ARG_INFO(0, prefix)
     335             : ZEND_END_ARG_INFO()
     336             : 
     337             : ZEND_BEGIN_ARG_INFO_EX(arginfo_compact, 0, 0, 1)
     338             :         ZEND_ARG_VARIADIC_INFO(0, var_names)
     339             : ZEND_END_ARG_INFO()
     340             : 
     341             : ZEND_BEGIN_ARG_INFO(arginfo_array_fill, 0)
     342             :         ZEND_ARG_INFO(0, start_key)
     343             :         ZEND_ARG_INFO(0, num)
     344             :         ZEND_ARG_INFO(0, val)
     345             : ZEND_END_ARG_INFO()
     346             : 
     347             : ZEND_BEGIN_ARG_INFO(arginfo_array_fill_keys, 0)
     348             :         ZEND_ARG_INFO(0, keys) /* ARRAY_INFO(0, keys, 0) */
     349             :         ZEND_ARG_INFO(0, val)
     350             : ZEND_END_ARG_INFO()
     351             : 
     352             : ZEND_BEGIN_ARG_INFO_EX(arginfo_range, 0, 0, 2)
     353             :         ZEND_ARG_INFO(0, low)
     354             :         ZEND_ARG_INFO(0, high)
     355             :         ZEND_ARG_INFO(0, step)
     356             : ZEND_END_ARG_INFO()
     357             : 
     358             : ZEND_BEGIN_ARG_INFO(arginfo_shuffle, 0)
     359             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     360             : ZEND_END_ARG_INFO()
     361             : 
     362             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_push, 0, 0, 2)
     363             :         ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
     364             :         ZEND_ARG_VARIADIC_INFO(0, vars)
     365             : ZEND_END_ARG_INFO()
     366             : 
     367             : ZEND_BEGIN_ARG_INFO(arginfo_array_pop, 0)
     368             :         ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
     369             : ZEND_END_ARG_INFO()
     370             : 
     371             : ZEND_BEGIN_ARG_INFO(arginfo_array_shift, 0)
     372             :         ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
     373             : ZEND_END_ARG_INFO()
     374             : 
     375             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unshift, 0, 0, 2)
     376             :         ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
     377             :         ZEND_ARG_VARIADIC_INFO(0, vars)
     378             : ZEND_END_ARG_INFO()
     379             : 
     380             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_splice, 0, 0, 2)
     381             :         ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
     382             :         ZEND_ARG_INFO(0, offset)
     383             :         ZEND_ARG_INFO(0, length)
     384             :         ZEND_ARG_INFO(0, replacement) /* ARRAY_INFO(0, arg, 1) */
     385             : ZEND_END_ARG_INFO()
     386             : 
     387             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_slice, 0, 0, 2)
     388             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(1, arg, 0) */
     389             :         ZEND_ARG_INFO(0, offset)
     390             :         ZEND_ARG_INFO(0, length)
     391             :         ZEND_ARG_INFO(0, preserve_keys)
     392             : ZEND_END_ARG_INFO()
     393             : 
     394             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge, 0, 0, 2)
     395             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
     396             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     397             : ZEND_END_ARG_INFO()
     398             : 
     399             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge_recursive, 0, 0, 2)
     400             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
     401             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     402             : ZEND_END_ARG_INFO()
     403             : 
     404             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace, 0, 0, 2)
     405             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
     406             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     407             : ZEND_END_ARG_INFO()
     408             : 
     409             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace_recursive, 0, 0, 2)
     410             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
     411             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     412             : ZEND_END_ARG_INFO()
     413             : 
     414             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_keys, 0, 0, 1)
     415             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     416             :         ZEND_ARG_INFO(0, search_value)
     417             :         ZEND_ARG_INFO(0, strict)
     418             : ZEND_END_ARG_INFO()
     419             : 
     420             : ZEND_BEGIN_ARG_INFO(arginfo_array_values, 0)
     421             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     422             : ZEND_END_ARG_INFO()
     423             : 
     424             : ZEND_BEGIN_ARG_INFO(arginfo_array_count_values, 0)
     425             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     426             : ZEND_END_ARG_INFO()
     427             : 
     428             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_column, 0, 0, 2)
     429             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     430             :         ZEND_ARG_INFO(0, column_key)
     431             :         ZEND_ARG_INFO(0, index_key)
     432             : ZEND_END_ARG_INFO()
     433             : 
     434             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reverse, 0, 0, 1)
     435             :         ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */
     436             :         ZEND_ARG_INFO(0, preserve_keys)
     437             : ZEND_END_ARG_INFO()
     438             : 
     439             : ZEND_BEGIN_ARG_INFO(arginfo_array_pad, 0)
     440             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     441             :         ZEND_ARG_INFO(0, pad_size)
     442             :         ZEND_ARG_INFO(0, pad_value)
     443             : ZEND_END_ARG_INFO()
     444             : 
     445             : ZEND_BEGIN_ARG_INFO(arginfo_array_flip, 0)
     446             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     447             : ZEND_END_ARG_INFO()
     448             : 
     449             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_change_key_case, 0, 0, 1)
     450             :         ZEND_ARG_INFO(0, input) /* ARRAY_INFO(0, arg, 0) */
     451             :         ZEND_ARG_INFO(0, case)
     452             : ZEND_END_ARG_INFO()
     453             : 
     454             : ZEND_BEGIN_ARG_INFO(arginfo_array_unique, 0)
     455             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     456             : ZEND_END_ARG_INFO()
     457             : 
     458             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_key, 0, 0, 2)
     459             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     460             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     461             : ZEND_END_ARG_INFO()
     462             : 
     463             : ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_ukey, 0)
     464             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     465             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     466             :         ZEND_ARG_INFO(0, callback_key_compare_func)
     467             : ZEND_END_ARG_INFO()
     468             : 
     469             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect, 0, 0, 2)
     470             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     471             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     472             : ZEND_END_ARG_INFO()
     473             : 
     474             : ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect, 0)
     475             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     476             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     477             :         ZEND_ARG_INFO(0, callback_data_compare_func)
     478             : ZEND_END_ARG_INFO()
     479             : 
     480             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_assoc, 0, 0, 2)
     481             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     482             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     483             : ZEND_END_ARG_INFO()
     484             : 
     485             : ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_assoc, 0)
     486             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     487             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     488             :         ZEND_ARG_INFO(0, callback_data_compare_func)
     489             : ZEND_END_ARG_INFO()
     490             : 
     491             : ZEND_BEGIN_ARG_INFO(arginfo_array_intersect_uassoc, 0)
     492             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     493             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     494             :         ZEND_ARG_INFO(0, callback_key_compare_func)
     495             : ZEND_END_ARG_INFO()
     496             : 
     497             : ZEND_BEGIN_ARG_INFO(arginfo_array_uintersect_uassoc, 0)
     498             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     499             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     500             :         ZEND_ARG_INFO(0, callback_data_compare_func)
     501             :         ZEND_ARG_INFO(0, callback_key_compare_func)
     502             : ZEND_END_ARG_INFO()
     503             : 
     504             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_key, 0, 0, 2)
     505             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     506             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     507             : ZEND_END_ARG_INFO()
     508             : 
     509             : ZEND_BEGIN_ARG_INFO(arginfo_array_diff_ukey, 0)
     510             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     511             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     512             :         ZEND_ARG_INFO(0, callback_key_comp_func)
     513             : ZEND_END_ARG_INFO()
     514             : 
     515             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff, 0, 0, 2)
     516             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     517             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     518             : ZEND_END_ARG_INFO()
     519             : 
     520             : ZEND_BEGIN_ARG_INFO(arginfo_array_udiff, 0)
     521             :         ZEND_ARG_INFO(0, arr1)
     522             :         ZEND_ARG_INFO(0, arr2)
     523             :         ZEND_ARG_INFO(0, callback_data_comp_func)
     524             : ZEND_END_ARG_INFO()
     525             : 
     526             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_diff_assoc, 0, 0, 2)
     527             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     528             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     529             : ZEND_END_ARG_INFO()
     530             : 
     531             : ZEND_BEGIN_ARG_INFO(arginfo_array_diff_uassoc, 0)
     532             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     533             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     534             :         ZEND_ARG_INFO(0, callback_data_comp_func)
     535             : ZEND_END_ARG_INFO()
     536             : 
     537             : ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_assoc, 0)
     538             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     539             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     540             :         ZEND_ARG_INFO(0, callback_key_comp_func)
     541             : ZEND_END_ARG_INFO()
     542             : 
     543             : ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_uassoc, 0)
     544             :         ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg1, 0) */
     545             :         ZEND_ARG_INFO(0, arr2) /* ARRAY_INFO(0, arg2, 0) */
     546             :         ZEND_ARG_INFO(0, callback_data_comp_func)
     547             :         ZEND_ARG_INFO(0, callback_key_comp_func)
     548             : ZEND_END_ARG_INFO()
     549             : 
     550             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, 0, 0, 1)
     551             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */
     552             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
     553             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
     554             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr2)
     555             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
     556             :         ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
     557             :         ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, more_array_and_sort_options)
     558             : ZEND_END_ARG_INFO()
     559             : 
     560             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
     561             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     562             :         ZEND_ARG_INFO(0, num_req)
     563             : ZEND_END_ARG_INFO()
     564             : 
     565             : ZEND_BEGIN_ARG_INFO(arginfo_array_sum, 0)
     566             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     567             : ZEND_END_ARG_INFO()
     568             : 
     569             : ZEND_BEGIN_ARG_INFO(arginfo_array_product, 0)
     570             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     571             : ZEND_END_ARG_INFO()
     572             : 
     573             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reduce, 0, 0, 2)
     574             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     575             :         ZEND_ARG_INFO(0, callback)
     576             :         ZEND_ARG_INFO(0, initial)
     577             : ZEND_END_ARG_INFO()
     578             : 
     579             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_filter, 0, 0, 1)
     580             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     581             :         ZEND_ARG_INFO(0, callback)
     582             :     ZEND_ARG_INFO(0, use_keys)
     583             : ZEND_END_ARG_INFO()
     584             : 
     585             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_map, 0, 0, 2)
     586             :         ZEND_ARG_INFO(0, callback)
     587             :         ZEND_ARG_VARIADIC_INFO(0, arrays)
     588             : ZEND_END_ARG_INFO()
     589             : 
     590             : ZEND_BEGIN_ARG_INFO(arginfo_array_key_exists, 0)
     591             :         ZEND_ARG_INFO(0, key)
     592             :         ZEND_ARG_INFO(0, search)
     593             : ZEND_END_ARG_INFO()
     594             : 
     595             : ZEND_BEGIN_ARG_INFO_EX(arginfo_array_chunk, 0, 0, 2)
     596             :         ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
     597             :         ZEND_ARG_INFO(0, size)
     598             :         ZEND_ARG_INFO(0, preserve_keys)
     599             : ZEND_END_ARG_INFO()
     600             : 
     601             : ZEND_BEGIN_ARG_INFO(arginfo_array_combine, 0)
     602             :         ZEND_ARG_INFO(0, keys)   /* ARRAY_INFO(0, keys, 0) */
     603             :         ZEND_ARG_INFO(0, values) /* ARRAY_INFO(0, values, 0) */
     604             : ZEND_END_ARG_INFO()
     605             : /* }}} */
     606             : /* {{{ basic_functions.c */
     607             : ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_gpc, 0)
     608             : ZEND_END_ARG_INFO()
     609             : 
     610             : ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_runtime, 0)
     611             : ZEND_END_ARG_INFO()
     612             : 
     613             : ZEND_BEGIN_ARG_INFO_EX(arginfo_set_magic_quotes_runtime, 0, 0, 1)
     614             :         ZEND_ARG_INFO(0, new_setting)
     615             : ZEND_END_ARG_INFO()
     616             : 
     617             : ZEND_BEGIN_ARG_INFO(arginfo_constant, 0)
     618             :         ZEND_ARG_INFO(0, const_name)
     619             : ZEND_END_ARG_INFO()
     620             : 
     621             : #ifdef HAVE_INET_NTOP
     622             : ZEND_BEGIN_ARG_INFO(arginfo_inet_ntop, 0)
     623             :         ZEND_ARG_INFO(0, in_addr)
     624             : ZEND_END_ARG_INFO()
     625             : #endif
     626             : 
     627             : #ifdef HAVE_INET_PTON
     628             : ZEND_BEGIN_ARG_INFO(arginfo_inet_pton, 0)
     629             :         ZEND_ARG_INFO(0, ip_address)
     630             : ZEND_END_ARG_INFO()
     631             : #endif
     632             : 
     633             : ZEND_BEGIN_ARG_INFO(arginfo_ip2long, 0)
     634             :         ZEND_ARG_INFO(0, ip_address)
     635             : ZEND_END_ARG_INFO()
     636             : 
     637             : ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0)
     638             :         ZEND_ARG_INFO(0, proper_address)
     639             : ZEND_END_ARG_INFO()
     640             : 
     641             : ZEND_BEGIN_ARG_INFO(arginfo_getenv, 0)
     642             :         ZEND_ARG_INFO(0, varname)
     643             : ZEND_END_ARG_INFO()
     644             : 
     645             : #ifdef HAVE_PUTENV
     646             : ZEND_BEGIN_ARG_INFO(arginfo_putenv, 0)
     647             :         ZEND_ARG_INFO(0, setting)
     648             : ZEND_END_ARG_INFO()
     649             : #endif
     650             : 
     651             : ZEND_BEGIN_ARG_INFO_EX(arginfo_getopt, 0, 0, 1)
     652             :         ZEND_ARG_INFO(0, options)
     653             :         ZEND_ARG_INFO(0, opts) /* ARRAY_INFO(0, opts, 1) */
     654             : ZEND_END_ARG_INFO()
     655             : 
     656             : ZEND_BEGIN_ARG_INFO(arginfo_flush, 0)
     657             : ZEND_END_ARG_INFO()
     658             : 
     659             : ZEND_BEGIN_ARG_INFO(arginfo_sleep, 0)
     660             :         ZEND_ARG_INFO(0, seconds)
     661             : ZEND_END_ARG_INFO()
     662             : 
     663             : ZEND_BEGIN_ARG_INFO(arginfo_usleep, 0)
     664             :         ZEND_ARG_INFO(0, micro_seconds)
     665             : ZEND_END_ARG_INFO()
     666             : 
     667             : #if HAVE_NANOSLEEP
     668             : ZEND_BEGIN_ARG_INFO(arginfo_time_nanosleep, 0)
     669             :         ZEND_ARG_INFO(0, seconds)
     670             :         ZEND_ARG_INFO(0, nanoseconds)
     671             : ZEND_END_ARG_INFO()
     672             : 
     673             : ZEND_BEGIN_ARG_INFO(arginfo_time_sleep_until, 0)
     674             :         ZEND_ARG_INFO(0, timestamp)
     675             : ZEND_END_ARG_INFO()
     676             : #endif
     677             : 
     678             : ZEND_BEGIN_ARG_INFO(arginfo_get_current_user, 0)
     679             : ZEND_END_ARG_INFO()
     680             : 
     681             : ZEND_BEGIN_ARG_INFO(arginfo_get_cfg_var, 0)
     682             :         ZEND_ARG_INFO(0, option_name)
     683             : ZEND_END_ARG_INFO()
     684             : 
     685             : ZEND_BEGIN_ARG_INFO_EX(arginfo_error_log, 0, 0, 1)
     686             :         ZEND_ARG_INFO(0, message)
     687             :         ZEND_ARG_INFO(0, message_type)
     688             :         ZEND_ARG_INFO(0, destination)
     689             :         ZEND_ARG_INFO(0, extra_headers)
     690             : ZEND_END_ARG_INFO()
     691             : 
     692             : ZEND_BEGIN_ARG_INFO_EX(arginfo_error_get_last, 0, 0, 0)
     693             : ZEND_END_ARG_INFO()
     694             : 
     695             : ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func, 0, 0, 1)
     696             :         ZEND_ARG_INFO(0, function_name)
     697             :         ZEND_ARG_VARIADIC_INFO(0, parameters)
     698             : ZEND_END_ARG_INFO()
     699             : 
     700             : ZEND_BEGIN_ARG_INFO_EX(arginfo_call_user_func_array, 0, 0, 2)
     701             :         ZEND_ARG_INFO(0, function_name)
     702             :         ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */
     703             : ZEND_END_ARG_INFO()
     704             : 
     705             : ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call, 0, 0, 1)
     706             :         ZEND_ARG_INFO(0, function_name)
     707             :         ZEND_ARG_VARIADIC_INFO(0, parameters)
     708             : ZEND_END_ARG_INFO()
     709             : 
     710             : ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call_array, 0, 0, 2)
     711             :         ZEND_ARG_INFO(0, function_name)
     712             :         ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */
     713             : ZEND_END_ARG_INFO()
     714             : 
     715             : ZEND_BEGIN_ARG_INFO_EX(arginfo_register_shutdown_function, 0, 0, 1)
     716             :         ZEND_ARG_INFO(0, function_name)
     717             :         ZEND_ARG_VARIADIC_INFO(0, parameters)
     718             : ZEND_END_ARG_INFO()
     719             : 
     720             : ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_file, 0, 0, 1)
     721             :         ZEND_ARG_INFO(0, file_name)
     722             :         ZEND_ARG_INFO(0, return)
     723             : ZEND_END_ARG_INFO()
     724             : 
     725             : ZEND_BEGIN_ARG_INFO(arginfo_php_strip_whitespace, 0)
     726             :         ZEND_ARG_INFO(0, file_name)
     727             : ZEND_END_ARG_INFO()
     728             : 
     729             : ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_string, 0, 0, 1)
     730             :         ZEND_ARG_INFO(0, string)
     731             :         ZEND_ARG_INFO(0, return)
     732             : ZEND_END_ARG_INFO()
     733             : 
     734             : ZEND_BEGIN_ARG_INFO(arginfo_ini_get, 0)
     735             :         ZEND_ARG_INFO(0, varname)
     736             : ZEND_END_ARG_INFO()
     737             : 
     738             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_get_all, 0, 0, 0)
     739             :         ZEND_ARG_INFO(0, extension)
     740             : ZEND_END_ARG_INFO()
     741             : 
     742             : ZEND_BEGIN_ARG_INFO(arginfo_ini_set, 0)
     743             :         ZEND_ARG_INFO(0, varname)
     744             :         ZEND_ARG_INFO(0, newvalue)
     745             : ZEND_END_ARG_INFO()
     746             : 
     747             : ZEND_BEGIN_ARG_INFO(arginfo_ini_restore, 0)
     748             :         ZEND_ARG_INFO(0, varname)
     749             : ZEND_END_ARG_INFO()
     750             : 
     751             : ZEND_BEGIN_ARG_INFO(arginfo_set_include_path, 0)
     752             :         ZEND_ARG_INFO(0, new_include_path)
     753             : ZEND_END_ARG_INFO()
     754             : 
     755             : ZEND_BEGIN_ARG_INFO(arginfo_get_include_path, 0)
     756             : ZEND_END_ARG_INFO()
     757             : 
     758             : ZEND_BEGIN_ARG_INFO(arginfo_restore_include_path, 0)
     759             : ZEND_END_ARG_INFO()
     760             : 
     761             : ZEND_BEGIN_ARG_INFO_EX(arginfo_print_r, 0, 0, 1)
     762             :         ZEND_ARG_INFO(0, var)
     763             :         ZEND_ARG_INFO(0, return)
     764             : ZEND_END_ARG_INFO()
     765             : 
     766             : ZEND_BEGIN_ARG_INFO(arginfo_connection_aborted, 0)
     767             : ZEND_END_ARG_INFO()
     768             : 
     769             : ZEND_BEGIN_ARG_INFO(arginfo_connection_status, 0)
     770             : ZEND_END_ARG_INFO()
     771             : 
     772             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ignore_user_abort, 0, 0, 0)
     773             :         ZEND_ARG_INFO(0, value)
     774             : ZEND_END_ARG_INFO()
     775             : 
     776             : #if HAVE_GETSERVBYNAME
     777             : ZEND_BEGIN_ARG_INFO(arginfo_getservbyname, 0)
     778             :         ZEND_ARG_INFO(0, service)
     779             :         ZEND_ARG_INFO(0, protocol)
     780             : ZEND_END_ARG_INFO()
     781             : #endif
     782             : 
     783             : #if HAVE_GETSERVBYPORT
     784             : ZEND_BEGIN_ARG_INFO(arginfo_getservbyport, 0)
     785             :         ZEND_ARG_INFO(0, port)
     786             :         ZEND_ARG_INFO(0, protocol)
     787             : ZEND_END_ARG_INFO()
     788             : #endif
     789             : 
     790             : #if HAVE_GETPROTOBYNAME
     791             : ZEND_BEGIN_ARG_INFO(arginfo_getprotobyname, 0)
     792             :         ZEND_ARG_INFO(0, name)
     793             : ZEND_END_ARG_INFO()
     794             : #endif
     795             : 
     796             : #if HAVE_GETPROTOBYNUMBER
     797             : ZEND_BEGIN_ARG_INFO(arginfo_getprotobynumber, 0)
     798             :         ZEND_ARG_INFO(0, proto)
     799             : ZEND_END_ARG_INFO()
     800             : #endif
     801             : 
     802             : ZEND_BEGIN_ARG_INFO_EX(arginfo_register_tick_function, 0, 0, 1)
     803             :         ZEND_ARG_INFO(0, function_name)
     804             :         ZEND_ARG_VARIADIC_INFO(0, parameters)
     805             : ZEND_END_ARG_INFO()
     806             : 
     807             : ZEND_BEGIN_ARG_INFO(arginfo_unregister_tick_function, 0)
     808             :         ZEND_ARG_INFO(0, function_name)
     809             : ZEND_END_ARG_INFO()
     810             : 
     811             : ZEND_BEGIN_ARG_INFO(arginfo_is_uploaded_file, 0)
     812             :         ZEND_ARG_INFO(0, path)
     813             : ZEND_END_ARG_INFO()
     814             : 
     815             : ZEND_BEGIN_ARG_INFO(arginfo_move_uploaded_file, 0)
     816             :         ZEND_ARG_INFO(0, path)
     817             :         ZEND_ARG_INFO(0, new_path)
     818             : ZEND_END_ARG_INFO()
     819             : 
     820             : ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
     821             :         ZEND_ARG_INFO(0, filename)
     822             :         ZEND_ARG_INFO(0, process_sections)
     823             :         ZEND_ARG_INFO(0, scanner_mode)
     824             : ZEND_END_ARG_INFO()
     825             : 
     826             : ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_string, 0, 0, 1)
     827             :     ZEND_ARG_INFO(0, ini_string)
     828             :     ZEND_ARG_INFO(0, process_sections)
     829             :     ZEND_ARG_INFO(0, scanner_mode)
     830             : ZEND_END_ARG_INFO()
     831             : 
     832             : #if ZEND_DEBUG
     833             : ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
     834             : ZEND_END_ARG_INFO()
     835             : #endif
     836             : 
     837             : #ifdef HAVE_GETLOADAVG
     838             : ZEND_BEGIN_ARG_INFO(arginfo_sys_getloadavg, 0)
     839             : ZEND_END_ARG_INFO()
     840             : #endif
     841             : /* }}} */
     842             : /* {{{ assert.c */
     843             : ZEND_BEGIN_ARG_INFO(arginfo_assert, 0)
     844             :         ZEND_ARG_INFO(0, assertion)
     845             : ZEND_END_ARG_INFO()
     846             : 
     847             : ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1)
     848             :         ZEND_ARG_INFO(0, what)
     849             :         ZEND_ARG_INFO(0, value)
     850             : ZEND_END_ARG_INFO()
     851             : /* }}} */
     852             : /* {{{ base64.c */
     853             : ZEND_BEGIN_ARG_INFO(arginfo_base64_encode, 0)
     854             :         ZEND_ARG_INFO(0, str)
     855             : ZEND_END_ARG_INFO()
     856             : 
     857             : ZEND_BEGIN_ARG_INFO_EX(arginfo_base64_decode, 0, 0, 1)
     858             :         ZEND_ARG_INFO(0, str)
     859             :         ZEND_ARG_INFO(0, strict)
     860             : ZEND_END_ARG_INFO()
     861             : 
     862             : /* }}} */
     863             : /* {{{ browscap.c */
     864             : ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0)
     865             :         ZEND_ARG_INFO(0, browser_name)
     866             :         ZEND_ARG_INFO(0, return_array)
     867             : ZEND_END_ARG_INFO()
     868             : /* }}} */
     869             : /* {{{ crc32.c */
     870             : ZEND_BEGIN_ARG_INFO(arginfo_crc32, 0)
     871             :         ZEND_ARG_INFO(0, str)
     872             : ZEND_END_ARG_INFO()
     873             : 
     874             : /* }}} */
     875             : /* {{{ crypt.c */
     876             : #if HAVE_CRYPT
     877             : ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1)
     878             :         ZEND_ARG_INFO(0, str)
     879             :         ZEND_ARG_INFO(0, salt)
     880             : ZEND_END_ARG_INFO()
     881             : #endif
     882             : /* }}} */
     883             : /* {{{ cyr_convert.c */
     884             : ZEND_BEGIN_ARG_INFO(arginfo_convert_cyr_string, 0)
     885             :         ZEND_ARG_INFO(0, str)
     886             :         ZEND_ARG_INFO(0, from)
     887             :         ZEND_ARG_INFO(0, to)
     888             : ZEND_END_ARG_INFO()
     889             : 
     890             : /* }}} */
     891             : /* {{{ datetime.c */
     892             : #if HAVE_STRPTIME
     893             : ZEND_BEGIN_ARG_INFO(arginfo_strptime, 0)
     894             :         ZEND_ARG_INFO(0, timestamp)
     895             :         ZEND_ARG_INFO(0, format)
     896             : ZEND_END_ARG_INFO()
     897             : #endif
     898             : /* }}} */
     899             : /* {{{ dir.c */
     900             : ZEND_BEGIN_ARG_INFO_EX(arginfo_opendir, 0, 0, 1)
     901             :         ZEND_ARG_INFO(0, path)
     902             :         ZEND_ARG_INFO(0, context)
     903             : ZEND_END_ARG_INFO()
     904             : 
     905             : ZEND_BEGIN_ARG_INFO_EX(arginfo_dir, 0, 0, 1)
     906             :         ZEND_ARG_INFO(0, directory)
     907             :         ZEND_ARG_INFO(0, context)
     908             : ZEND_END_ARG_INFO()
     909             : 
     910             : ZEND_BEGIN_ARG_INFO_EX(arginfo_closedir, 0, 0, 0)
     911             :         ZEND_ARG_INFO(0, dir_handle)
     912             : ZEND_END_ARG_INFO()
     913             : 
     914             : #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
     915             : ZEND_BEGIN_ARG_INFO(arginfo_chroot, 0)
     916             :         ZEND_ARG_INFO(0, directory)
     917             : ZEND_END_ARG_INFO()
     918             : #endif
     919             : 
     920             : ZEND_BEGIN_ARG_INFO(arginfo_chdir, 0)
     921             :         ZEND_ARG_INFO(0, directory)
     922             : ZEND_END_ARG_INFO()
     923             : 
     924             : ZEND_BEGIN_ARG_INFO(arginfo_getcwd, 0)
     925             : ZEND_END_ARG_INFO()
     926             : 
     927             : ZEND_BEGIN_ARG_INFO_EX(arginfo_rewinddir, 0, 0, 0)
     928             :         ZEND_ARG_INFO(0, dir_handle)
     929             : ZEND_END_ARG_INFO()
     930             : 
     931             : ZEND_BEGIN_ARG_INFO_EX(arginfo_readdir, 0, 0, 0)
     932             :         ZEND_ARG_INFO(0, dir_handle)
     933             : ZEND_END_ARG_INFO()
     934             : 
     935             : #ifdef HAVE_GLOB
     936             : ZEND_BEGIN_ARG_INFO_EX(arginfo_glob, 0, 0, 1)
     937             :         ZEND_ARG_INFO(0, pattern)
     938             :         ZEND_ARG_INFO(0, flags)
     939             : ZEND_END_ARG_INFO()
     940             : #endif
     941             : 
     942             : ZEND_BEGIN_ARG_INFO_EX(arginfo_scandir, 0, 0, 1)
     943             :         ZEND_ARG_INFO(0, dir)
     944             :         ZEND_ARG_INFO(0, sorting_order)
     945             :         ZEND_ARG_INFO(0, context)
     946             : ZEND_END_ARG_INFO()
     947             : /* }}} */
     948             : /* {{{ dns.c */
     949             : ZEND_BEGIN_ARG_INFO(arginfo_gethostbyaddr, 0)
     950             :         ZEND_ARG_INFO(0, ip_address)
     951             : ZEND_END_ARG_INFO()
     952             : 
     953             : ZEND_BEGIN_ARG_INFO(arginfo_gethostbyname, 0)
     954             :         ZEND_ARG_INFO(0, hostname)
     955             : ZEND_END_ARG_INFO()
     956             : 
     957             : ZEND_BEGIN_ARG_INFO(arginfo_gethostbynamel, 0)
     958             :         ZEND_ARG_INFO(0, hostname)
     959             : ZEND_END_ARG_INFO()
     960             : 
     961             : #ifdef HAVE_GETHOSTNAME
     962             : ZEND_BEGIN_ARG_INFO(arginfo_gethostname, 0)
     963             : ZEND_END_ARG_INFO()
     964             : #endif
     965             : 
     966             : #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
     967             : ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_check_record, 0, 0, 1)
     968             :         ZEND_ARG_INFO(0, host)
     969             :         ZEND_ARG_INFO(0, type)
     970             : ZEND_END_ARG_INFO()
     971             : 
     972             : # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
     973             : ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 0, 0, 1)
     974             :         ZEND_ARG_INFO(0, hostname)
     975             :         ZEND_ARG_INFO(0, type)
     976             :         ZEND_ARG_ARRAY_INFO(1, authns, 1)
     977             :         ZEND_ARG_ARRAY_INFO(1, addtl, 1)
     978             :         ZEND_ARG_INFO(0, raw)
     979             : ZEND_END_ARG_INFO()
     980             : 
     981             : ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_mx, 0, 0, 2)
     982             :         ZEND_ARG_INFO(0, hostname)
     983             :         ZEND_ARG_INFO(1, mxhosts) /* ARRAY_INFO(1, mxhosts, 1) */
     984             :         ZEND_ARG_INFO(1, weight) /* ARRAY_INFO(1, weight, 1) */
     985             : ZEND_END_ARG_INFO()
     986             : # endif
     987             : 
     988             : #endif /* defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE))) */
     989             : /* }}} */
     990             : 
     991             : /* {{{ exec.c */
     992             : ZEND_BEGIN_ARG_INFO_EX(arginfo_exec, 0, 0, 1)
     993             :         ZEND_ARG_INFO(0, command)
     994             :         ZEND_ARG_INFO(1, output) /* ARRAY_INFO(1, output, 1) */
     995             :         ZEND_ARG_INFO(1, return_value)
     996             : ZEND_END_ARG_INFO()
     997             : 
     998             : ZEND_BEGIN_ARG_INFO_EX(arginfo_system, 0, 0, 1)
     999             :         ZEND_ARG_INFO(0, command)
    1000             :         ZEND_ARG_INFO(1, return_value)
    1001             : ZEND_END_ARG_INFO()
    1002             : 
    1003             : ZEND_BEGIN_ARG_INFO_EX(arginfo_passthru, 0, 0, 1)
    1004             :         ZEND_ARG_INFO(0, command)
    1005             :         ZEND_ARG_INFO(1, return_value)
    1006             : ZEND_END_ARG_INFO()
    1007             : 
    1008             : ZEND_BEGIN_ARG_INFO(arginfo_escapeshellcmd, 0)
    1009             :         ZEND_ARG_INFO(0, command)
    1010             : ZEND_END_ARG_INFO()
    1011             : 
    1012             : ZEND_BEGIN_ARG_INFO(arginfo_escapeshellarg, 0)
    1013             :         ZEND_ARG_INFO(0, arg)
    1014             : ZEND_END_ARG_INFO()
    1015             : 
    1016             : ZEND_BEGIN_ARG_INFO(arginfo_shell_exec, 0)
    1017             :         ZEND_ARG_INFO(0, cmd)
    1018             : ZEND_END_ARG_INFO()
    1019             : 
    1020             : #ifdef HAVE_NICE
    1021             : ZEND_BEGIN_ARG_INFO(arginfo_proc_nice, 0)
    1022             :         ZEND_ARG_INFO(0, priority)
    1023             : ZEND_END_ARG_INFO()
    1024             : #endif
    1025             : /* }}} */
    1026             : /* {{{ file.c */
    1027             : ZEND_BEGIN_ARG_INFO_EX(arginfo_flock, 0, 0, 2)
    1028             :         ZEND_ARG_INFO(0, fp)
    1029             :         ZEND_ARG_INFO(0, operation)
    1030             :         ZEND_ARG_INFO(1, wouldblock)
    1031             : ZEND_END_ARG_INFO()
    1032             : 
    1033             : ZEND_BEGIN_ARG_INFO_EX(arginfo_get_meta_tags, 0, 0, 1)
    1034             :         ZEND_ARG_INFO(0, filename)
    1035             :         ZEND_ARG_INFO(0, use_include_path)
    1036             : ZEND_END_ARG_INFO()
    1037             : 
    1038             : ZEND_BEGIN_ARG_INFO_EX(arginfo_file_get_contents, 0, 0, 1)
    1039             :         ZEND_ARG_INFO(0, filename)
    1040             :         ZEND_ARG_INFO(0, flags)
    1041             :         ZEND_ARG_INFO(0, context)
    1042             :         ZEND_ARG_INFO(0, offset)
    1043             :         ZEND_ARG_INFO(0, maxlen)
    1044             : ZEND_END_ARG_INFO()
    1045             : 
    1046             : ZEND_BEGIN_ARG_INFO_EX(arginfo_file_put_contents, 0, 0, 2)
    1047             :         ZEND_ARG_INFO(0, filename)
    1048             :         ZEND_ARG_INFO(0, data)
    1049             :         ZEND_ARG_INFO(0, flags)
    1050             :         ZEND_ARG_INFO(0, context)
    1051             : ZEND_END_ARG_INFO()
    1052             : 
    1053             : ZEND_BEGIN_ARG_INFO_EX(arginfo_file, 0, 0, 1)
    1054             :         ZEND_ARG_INFO(0, filename)
    1055             :         ZEND_ARG_INFO(0, flags)
    1056             :         ZEND_ARG_INFO(0, context)
    1057             : ZEND_END_ARG_INFO()
    1058             : 
    1059             : ZEND_BEGIN_ARG_INFO(arginfo_tempnam, 0)
    1060             :         ZEND_ARG_INFO(0, dir)
    1061             :         ZEND_ARG_INFO(0, prefix)
    1062             : ZEND_END_ARG_INFO()
    1063             : 
    1064             : ZEND_BEGIN_ARG_INFO(arginfo_tmpfile, 0)
    1065             : ZEND_END_ARG_INFO()
    1066             : 
    1067             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fopen, 0, 0, 2)
    1068             :         ZEND_ARG_INFO(0, filename)
    1069             :         ZEND_ARG_INFO(0, mode)
    1070             :         ZEND_ARG_INFO(0, use_include_path)
    1071             :         ZEND_ARG_INFO(0, context)
    1072             : ZEND_END_ARG_INFO()
    1073             : 
    1074             : ZEND_BEGIN_ARG_INFO(arginfo_fclose, 0)
    1075             :         ZEND_ARG_INFO(0, fp)
    1076             : ZEND_END_ARG_INFO()
    1077             : 
    1078             : ZEND_BEGIN_ARG_INFO(arginfo_popen, 0)
    1079             :         ZEND_ARG_INFO(0, command)
    1080             :         ZEND_ARG_INFO(0, mode)
    1081             : ZEND_END_ARG_INFO()
    1082             : 
    1083             : ZEND_BEGIN_ARG_INFO(arginfo_pclose, 0)
    1084             :         ZEND_ARG_INFO(0, fp)
    1085             : ZEND_END_ARG_INFO()
    1086             : 
    1087             : ZEND_BEGIN_ARG_INFO(arginfo_feof, 0)
    1088             :         ZEND_ARG_INFO(0, fp)
    1089             : ZEND_END_ARG_INFO()
    1090             : 
    1091             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fgets, 0, 0, 1)
    1092             :         ZEND_ARG_INFO(0, fp)
    1093             :         ZEND_ARG_INFO(0, length)
    1094             : ZEND_END_ARG_INFO()
    1095             : 
    1096             : ZEND_BEGIN_ARG_INFO(arginfo_fgetc, 0)
    1097             :         ZEND_ARG_INFO(0, fp)
    1098             : ZEND_END_ARG_INFO()
    1099             : 
    1100             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetss, 0, 0, 1)
    1101             :         ZEND_ARG_INFO(0, fp)
    1102             :         ZEND_ARG_INFO(0, length)
    1103             :         ZEND_ARG_INFO(0, allowable_tags)
    1104             : ZEND_END_ARG_INFO()
    1105             : 
    1106             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fscanf, 0, 0, 2)
    1107             :         ZEND_ARG_INFO(0, stream)
    1108             :         ZEND_ARG_INFO(0, format)
    1109             :         ZEND_ARG_VARIADIC_INFO(1, vars)
    1110             : ZEND_END_ARG_INFO()
    1111             : 
    1112             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fwrite, 0, 0, 2)
    1113             :         ZEND_ARG_INFO(0, fp)
    1114             :         ZEND_ARG_INFO(0, str)
    1115             :         ZEND_ARG_INFO(0, length)
    1116             : ZEND_END_ARG_INFO()
    1117             : 
    1118             : ZEND_BEGIN_ARG_INFO(arginfo_fflush, 0)
    1119             :         ZEND_ARG_INFO(0, fp)
    1120             : ZEND_END_ARG_INFO()
    1121             : 
    1122             : ZEND_BEGIN_ARG_INFO(arginfo_rewind, 0)
    1123             :         ZEND_ARG_INFO(0, fp)
    1124             : ZEND_END_ARG_INFO()
    1125             : 
    1126             : ZEND_BEGIN_ARG_INFO(arginfo_ftell, 0)
    1127             :         ZEND_ARG_INFO(0, fp)
    1128             : ZEND_END_ARG_INFO()
    1129             : 
    1130             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fseek, 0, 0, 2)
    1131             :         ZEND_ARG_INFO(0, fp)
    1132             :         ZEND_ARG_INFO(0, offset)
    1133             :         ZEND_ARG_INFO(0, whence)
    1134             : ZEND_END_ARG_INFO()
    1135             : 
    1136             : ZEND_BEGIN_ARG_INFO_EX(arginfo_mkdir, 0, 0, 1)
    1137             :         ZEND_ARG_INFO(0, pathname)
    1138             :         ZEND_ARG_INFO(0, mode)
    1139             :         ZEND_ARG_INFO(0, recursive)
    1140             :         ZEND_ARG_INFO(0, context)
    1141             : ZEND_END_ARG_INFO()
    1142             : 
    1143             : ZEND_BEGIN_ARG_INFO_EX(arginfo_rmdir, 0, 0, 1)
    1144             :         ZEND_ARG_INFO(0, dirname)
    1145             :         ZEND_ARG_INFO(0, context)
    1146             : ZEND_END_ARG_INFO()
    1147             : 
    1148             : ZEND_BEGIN_ARG_INFO_EX(arginfo_readfile, 0, 0, 1)
    1149             :         ZEND_ARG_INFO(0, filename)
    1150             :         ZEND_ARG_INFO(0, flags)
    1151             :         ZEND_ARG_INFO(0, context)
    1152             : ZEND_END_ARG_INFO()
    1153             : 
    1154             : ZEND_BEGIN_ARG_INFO_EX(arginfo_umask, 0, 0, 0)
    1155             :         ZEND_ARG_INFO(0, mask)
    1156             : ZEND_END_ARG_INFO()
    1157             : 
    1158             : ZEND_BEGIN_ARG_INFO(arginfo_fpassthru, 0)
    1159             :         ZEND_ARG_INFO(0, fp)
    1160             : ZEND_END_ARG_INFO()
    1161             : 
    1162             : ZEND_BEGIN_ARG_INFO_EX(arginfo_rename, 0, 0, 2)
    1163             :         ZEND_ARG_INFO(0, old_name)
    1164             :         ZEND_ARG_INFO(0, new_name)
    1165             :         ZEND_ARG_INFO(0, context)
    1166             : ZEND_END_ARG_INFO()
    1167             : 
    1168             : ZEND_BEGIN_ARG_INFO_EX(arginfo_unlink, 0, 0, 1)
    1169             :         ZEND_ARG_INFO(0, filename)
    1170             :         ZEND_ARG_INFO(0, context)
    1171             : ZEND_END_ARG_INFO()
    1172             : 
    1173             : ZEND_BEGIN_ARG_INFO(arginfo_ftruncate, 0)
    1174             :         ZEND_ARG_INFO(0, fp)
    1175             :         ZEND_ARG_INFO(0, size)
    1176             : ZEND_END_ARG_INFO()
    1177             : 
    1178             : ZEND_BEGIN_ARG_INFO(arginfo_fstat, 0)
    1179             :         ZEND_ARG_INFO(0, fp)
    1180             : ZEND_END_ARG_INFO()
    1181             : ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2)
    1182             :         ZEND_ARG_INFO(0, source_file)
    1183             :         ZEND_ARG_INFO(0, destination_file)
    1184             :         ZEND_ARG_INFO(0, context)
    1185             : ZEND_END_ARG_INFO()
    1186             : 
    1187             : ZEND_BEGIN_ARG_INFO(arginfo_fread, 0)
    1188             :         ZEND_ARG_INFO(0, fp)
    1189             :         ZEND_ARG_INFO(0, length)
    1190             : ZEND_END_ARG_INFO()
    1191             : 
    1192             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fputcsv, 0, 0, 2)
    1193             :         ZEND_ARG_INFO(0, fp)
    1194             :         ZEND_ARG_INFO(0, fields) /* ARRAY_INFO(0, fields, 1) */
    1195             :         ZEND_ARG_INFO(0, delimiter)
    1196             :         ZEND_ARG_INFO(0, enclosure)
    1197             : ZEND_END_ARG_INFO()
    1198             : 
    1199             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetcsv, 0, 0, 1)
    1200             :         ZEND_ARG_INFO(0, fp)
    1201             :         ZEND_ARG_INFO(0, length)
    1202             :         ZEND_ARG_INFO(0, delimiter)
    1203             :         ZEND_ARG_INFO(0, enclosure)
    1204             :         ZEND_ARG_INFO(0, escape)
    1205             : ZEND_END_ARG_INFO()
    1206             : 
    1207             : #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
    1208             : ZEND_BEGIN_ARG_INFO(arginfo_realpath, 0)
    1209             :         ZEND_ARG_INFO(0, path)
    1210             : ZEND_END_ARG_INFO()
    1211             : #endif
    1212             : 
    1213             : #ifdef HAVE_FNMATCH
    1214             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fnmatch, 0, 0, 2)
    1215             :         ZEND_ARG_INFO(0, pattern)
    1216             :         ZEND_ARG_INFO(0, filename)
    1217             :         ZEND_ARG_INFO(0, flags)
    1218             : ZEND_END_ARG_INFO()
    1219             : #endif
    1220             : 
    1221             : ZEND_BEGIN_ARG_INFO(arginfo_sys_get_temp_dir, 0)
    1222             : ZEND_END_ARG_INFO()
    1223             : /* }}} */
    1224             : /* {{{ filestat.c */
    1225             : ZEND_BEGIN_ARG_INFO(arginfo_disk_total_space, 0)
    1226             :         ZEND_ARG_INFO(0, path)
    1227             : ZEND_END_ARG_INFO()
    1228             : 
    1229             : ZEND_BEGIN_ARG_INFO(arginfo_disk_free_space, 0)
    1230             :         ZEND_ARG_INFO(0, path)
    1231             : ZEND_END_ARG_INFO()
    1232             : 
    1233             : #ifndef NETWARE
    1234             : ZEND_BEGIN_ARG_INFO(arginfo_chgrp, 0)
    1235             :         ZEND_ARG_INFO(0, filename)
    1236             :         ZEND_ARG_INFO(0, group)
    1237             : ZEND_END_ARG_INFO()
    1238             : 
    1239             : ZEND_BEGIN_ARG_INFO(arginfo_chown, 0)
    1240             :         ZEND_ARG_INFO(0, filename)
    1241             :         ZEND_ARG_INFO(0, user)
    1242             : ZEND_END_ARG_INFO()
    1243             : #endif
    1244             : 
    1245             : #if HAVE_LCHOWN
    1246             : ZEND_BEGIN_ARG_INFO(arginfo_lchgrp, 0)
    1247             :         ZEND_ARG_INFO(0, filename)
    1248             :         ZEND_ARG_INFO(0, group)
    1249             : ZEND_END_ARG_INFO()
    1250             : 
    1251             : ZEND_BEGIN_ARG_INFO(arginfo_lchown, 0)
    1252             :         ZEND_ARG_INFO(0, filename)
    1253             :         ZEND_ARG_INFO(0, user)
    1254             : ZEND_END_ARG_INFO()
    1255             : #endif
    1256             : 
    1257             : ZEND_BEGIN_ARG_INFO(arginfo_chmod, 0)
    1258             :         ZEND_ARG_INFO(0, filename)
    1259             :         ZEND_ARG_INFO(0, mode)
    1260             : ZEND_END_ARG_INFO()
    1261             : 
    1262             : #if HAVE_UTIME
    1263             : ZEND_BEGIN_ARG_INFO_EX(arginfo_touch, 0, 0, 1)
    1264             :         ZEND_ARG_INFO(0, filename)
    1265             :         ZEND_ARG_INFO(0, time)
    1266             :         ZEND_ARG_INFO(0, atime)
    1267             : ZEND_END_ARG_INFO()
    1268             : #endif
    1269             : 
    1270             : ZEND_BEGIN_ARG_INFO_EX(arginfo_clearstatcache, 0, 0, 0)
    1271             :         ZEND_ARG_INFO(0, clear_realpath_cache)
    1272             :         ZEND_ARG_INFO(0, filename)
    1273             : ZEND_END_ARG_INFO()
    1274             : 
    1275             : ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_size, 0)
    1276             : ZEND_END_ARG_INFO()
    1277             : 
    1278             : ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_get, 0)
    1279             : ZEND_END_ARG_INFO()
    1280             : 
    1281             : ZEND_BEGIN_ARG_INFO(arginfo_fileperms, 0)
    1282             :         ZEND_ARG_INFO(0, filename)
    1283             : ZEND_END_ARG_INFO()
    1284             : 
    1285             : ZEND_BEGIN_ARG_INFO(arginfo_fileinode, 0)
    1286             :         ZEND_ARG_INFO(0, filename)
    1287             : ZEND_END_ARG_INFO()
    1288             : 
    1289             : ZEND_BEGIN_ARG_INFO(arginfo_filesize, 0)
    1290             :         ZEND_ARG_INFO(0, filename)
    1291             : ZEND_END_ARG_INFO()
    1292             : 
    1293             : ZEND_BEGIN_ARG_INFO(arginfo_fileowner, 0)
    1294             :         ZEND_ARG_INFO(0, filename)
    1295             : ZEND_END_ARG_INFO()
    1296             : 
    1297             : ZEND_BEGIN_ARG_INFO(arginfo_filegroup, 0)
    1298             :         ZEND_ARG_INFO(0, filename)
    1299             : ZEND_END_ARG_INFO()
    1300             : 
    1301             : ZEND_BEGIN_ARG_INFO(arginfo_fileatime, 0)
    1302             :         ZEND_ARG_INFO(0, filename)
    1303             : ZEND_END_ARG_INFO()
    1304             : 
    1305             : ZEND_BEGIN_ARG_INFO(arginfo_filemtime, 0)
    1306             :         ZEND_ARG_INFO(0, filename)
    1307             : ZEND_END_ARG_INFO()
    1308             : 
    1309             : ZEND_BEGIN_ARG_INFO(arginfo_filectime, 0)
    1310             :         ZEND_ARG_INFO(0, filename)
    1311             : ZEND_END_ARG_INFO()
    1312             : 
    1313             : ZEND_BEGIN_ARG_INFO(arginfo_filetype, 0)
    1314             :         ZEND_ARG_INFO(0, filename)
    1315             : ZEND_END_ARG_INFO()
    1316             : 
    1317             : ZEND_BEGIN_ARG_INFO(arginfo_is_writable, 0)
    1318             :         ZEND_ARG_INFO(0, filename)
    1319             : ZEND_END_ARG_INFO()
    1320             : 
    1321             : ZEND_BEGIN_ARG_INFO(arginfo_is_readable, 0)
    1322             :         ZEND_ARG_INFO(0, filename)
    1323             : ZEND_END_ARG_INFO()
    1324             : 
    1325             : ZEND_BEGIN_ARG_INFO(arginfo_is_executable, 0)
    1326             :         ZEND_ARG_INFO(0, filename)
    1327             : ZEND_END_ARG_INFO()
    1328             : 
    1329             : ZEND_BEGIN_ARG_INFO(arginfo_is_file, 0)
    1330             :         ZEND_ARG_INFO(0, filename)
    1331             : ZEND_END_ARG_INFO()
    1332             : 
    1333             : ZEND_BEGIN_ARG_INFO(arginfo_is_dir, 0)
    1334             :         ZEND_ARG_INFO(0, filename)
    1335             : ZEND_END_ARG_INFO()
    1336             : 
    1337             : ZEND_BEGIN_ARG_INFO(arginfo_is_link, 0)
    1338             :         ZEND_ARG_INFO(0, filename)
    1339             : ZEND_END_ARG_INFO()
    1340             : 
    1341             : ZEND_BEGIN_ARG_INFO(arginfo_file_exists, 0)
    1342             :         ZEND_ARG_INFO(0, filename)
    1343             : ZEND_END_ARG_INFO()
    1344             : 
    1345             : ZEND_BEGIN_ARG_INFO(arginfo_lstat, 0)
    1346             :         ZEND_ARG_INFO(0, filename)
    1347             : ZEND_END_ARG_INFO()
    1348             : 
    1349             : ZEND_BEGIN_ARG_INFO(arginfo_stat, 0)
    1350             :         ZEND_ARG_INFO(0, filename)
    1351             : ZEND_END_ARG_INFO()
    1352             : /* }}} */
    1353             : /* {{{ formatted_print.c */
    1354             : ZEND_BEGIN_ARG_INFO_EX(arginfo_sprintf, 0, 0, 2)
    1355             :         ZEND_ARG_INFO(0, format)
    1356             :         ZEND_ARG_VARIADIC_INFO(0, args)
    1357             : ZEND_END_ARG_INFO()
    1358             : 
    1359             : ZEND_BEGIN_ARG_INFO(arginfo_vsprintf, 0)
    1360             :         ZEND_ARG_INFO(0, format)
    1361             :         ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
    1362             : ZEND_END_ARG_INFO()
    1363             : 
    1364             : ZEND_BEGIN_ARG_INFO_EX(arginfo_printf, 0, 0, 1)
    1365             :         ZEND_ARG_INFO(0, format)
    1366             :         ZEND_ARG_VARIADIC_INFO(0, args)
    1367             : ZEND_END_ARG_INFO()
    1368             : 
    1369             : ZEND_BEGIN_ARG_INFO(arginfo_vprintf, 0)
    1370             :         ZEND_ARG_INFO(0, format)
    1371             :         ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
    1372             : ZEND_END_ARG_INFO()
    1373             : 
    1374             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fprintf, 0, 0, 2)
    1375             :         ZEND_ARG_INFO(0, stream)
    1376             :         ZEND_ARG_INFO(0, format)
    1377             :         ZEND_ARG_VARIADIC_INFO(0, args)
    1378             : ZEND_END_ARG_INFO()
    1379             : 
    1380             : ZEND_BEGIN_ARG_INFO(arginfo_vfprintf, 0)
    1381             :         ZEND_ARG_INFO(0, stream)
    1382             :         ZEND_ARG_INFO(0, format)
    1383             :         ZEND_ARG_INFO(0, args) /* ARRAY_INFO(0, args, 1) */
    1384             : ZEND_END_ARG_INFO()
    1385             : /* }}} */
    1386             : /* {{{ fsock.c */
    1387             : ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
    1388             :         ZEND_ARG_INFO(0, hostname)
    1389             :         ZEND_ARG_INFO(0, port)
    1390             :         ZEND_ARG_INFO(1, errno)
    1391             :         ZEND_ARG_INFO(1, errstr)
    1392             :         ZEND_ARG_INFO(0, timeout)
    1393             : ZEND_END_ARG_INFO()
    1394             : 
    1395             : ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 2)
    1396             :         ZEND_ARG_INFO(0, hostname)
    1397             :         ZEND_ARG_INFO(0, port)
    1398             :         ZEND_ARG_INFO(1, errno)
    1399             :         ZEND_ARG_INFO(1, errstr)
    1400             :         ZEND_ARG_INFO(0, timeout)
    1401             : ZEND_END_ARG_INFO()
    1402             : /* }}} */
    1403             : /* {{{ ftok.c */
    1404             : #if HAVE_FTOK
    1405             : ZEND_BEGIN_ARG_INFO(arginfo_ftok, 0)
    1406             :         ZEND_ARG_INFO(0, pathname)
    1407             :         ZEND_ARG_INFO(0, proj)
    1408             : ZEND_END_ARG_INFO()
    1409             : #endif
    1410             : /* }}} */
    1411             : /* {{{ head.c */
    1412             : ZEND_BEGIN_ARG_INFO_EX(arginfo_header, 0, 0, 1)
    1413             :         ZEND_ARG_INFO(0, header)
    1414             :         ZEND_ARG_INFO(0, replace)
    1415             :         ZEND_ARG_INFO(0, http_response_code)
    1416             : ZEND_END_ARG_INFO()
    1417             : 
    1418             : ZEND_BEGIN_ARG_INFO_EX(arginfo_header_remove, 0, 0, 0)
    1419             :         ZEND_ARG_INFO(0, name)
    1420             : ZEND_END_ARG_INFO()
    1421             : 
    1422             : ZEND_BEGIN_ARG_INFO_EX(arginfo_setcookie, 0, 0, 1)
    1423             :         ZEND_ARG_INFO(0, name)
    1424             :         ZEND_ARG_INFO(0, value)
    1425             :         ZEND_ARG_INFO(0, expires)
    1426             :         ZEND_ARG_INFO(0, path)
    1427             :         ZEND_ARG_INFO(0, domain)
    1428             :         ZEND_ARG_INFO(0, secure)
    1429             : ZEND_END_ARG_INFO()
    1430             : 
    1431             : ZEND_BEGIN_ARG_INFO_EX(arginfo_setrawcookie, 0, 0, 1)
    1432             :         ZEND_ARG_INFO(0, name)
    1433             :         ZEND_ARG_INFO(0, value)
    1434             :         ZEND_ARG_INFO(0, expires)
    1435             :         ZEND_ARG_INFO(0, path)
    1436             :         ZEND_ARG_INFO(0, domain)
    1437             :         ZEND_ARG_INFO(0, secure)
    1438             : ZEND_END_ARG_INFO()
    1439             : 
    1440             : ZEND_BEGIN_ARG_INFO_EX(arginfo_headers_sent, 0, 0, 0)
    1441             :         ZEND_ARG_INFO(1, file)
    1442             :         ZEND_ARG_INFO(1, line)
    1443             : ZEND_END_ARG_INFO()
    1444             : 
    1445             : ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0)
    1446             : ZEND_END_ARG_INFO()
    1447             : 
    1448             : ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0)
    1449             :         ZEND_ARG_INFO(0, response_code)
    1450             : ZEND_END_ARG_INFO()
    1451             : /* }}} */
    1452             : /* {{{ html.c */
    1453             : ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars, 0, 0, 1)
    1454             :         ZEND_ARG_INFO(0, string)
    1455             :         ZEND_ARG_INFO(0, quote_style)
    1456             :         ZEND_ARG_INFO(0, charset)
    1457             :         ZEND_ARG_INFO(0, double_encode)
    1458             : ZEND_END_ARG_INFO()
    1459             : 
    1460             : ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars_decode, 0, 0, 1)
    1461             :         ZEND_ARG_INFO(0, string)
    1462             :         ZEND_ARG_INFO(0, quote_style)
    1463             : ZEND_END_ARG_INFO()
    1464             : 
    1465             : ZEND_BEGIN_ARG_INFO_EX(arginfo_html_entity_decode, 0, 0, 1)
    1466             :         ZEND_ARG_INFO(0, string)
    1467             :         ZEND_ARG_INFO(0, quote_style)
    1468             :         ZEND_ARG_INFO(0, charset)
    1469             : ZEND_END_ARG_INFO()
    1470             : 
    1471             : ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlentities, 0, 0, 1)
    1472             :         ZEND_ARG_INFO(0, string)
    1473             :         ZEND_ARG_INFO(0, quote_style)
    1474             :         ZEND_ARG_INFO(0, charset)
    1475             :         ZEND_ARG_INFO(0, double_encode)
    1476             : ZEND_END_ARG_INFO()
    1477             : 
    1478             : ZEND_BEGIN_ARG_INFO_EX(arginfo_get_html_translation_table, 0, 0, 0)
    1479             :         ZEND_ARG_INFO(0, table)
    1480             :         ZEND_ARG_INFO(0, quote_style)
    1481             : ZEND_END_ARG_INFO()
    1482             : 
    1483             : /* }}} */
    1484             : /* {{{ http.c */
    1485             : ZEND_BEGIN_ARG_INFO_EX(arginfo_http_build_query, 0, 0, 1)
    1486             :         ZEND_ARG_INFO(0, formdata)
    1487             :         ZEND_ARG_INFO(0, prefix)
    1488             :         ZEND_ARG_INFO(0, arg_separator)
    1489             :         ZEND_ARG_INFO(0, enc_type)
    1490             : ZEND_END_ARG_INFO()
    1491             : /* }}} */
    1492             : /* {{{ image.c */
    1493             : ZEND_BEGIN_ARG_INFO(arginfo_image_type_to_mime_type, 0)
    1494             :         ZEND_ARG_INFO(0, imagetype)
    1495             : ZEND_END_ARG_INFO()
    1496             : 
    1497             : ZEND_BEGIN_ARG_INFO_EX(arginfo_image_type_to_extension, 0, 0, 1)
    1498             :         ZEND_ARG_INFO(0, imagetype)
    1499             :         ZEND_ARG_INFO(0, include_dot)
    1500             : ZEND_END_ARG_INFO()
    1501             : 
    1502             : ZEND_BEGIN_ARG_INFO_EX(arginfo_getimagesize, 0, 0, 1)
    1503             :         ZEND_ARG_INFO(0, imagefile)
    1504             :         ZEND_ARG_INFO(1, info) /* ARRAY_INFO(1, info, 1) */
    1505             : ZEND_END_ARG_INFO()
    1506             : /* }}} */
    1507             : /* {{{ info.c */
    1508             : ZEND_BEGIN_ARG_INFO_EX(arginfo_phpinfo, 0, 0, 0)
    1509             :         ZEND_ARG_INFO(0, what)
    1510             : ZEND_END_ARG_INFO()
    1511             : 
    1512             : ZEND_BEGIN_ARG_INFO_EX(arginfo_phpversion, 0, 0, 0)
    1513             :         ZEND_ARG_INFO(0, extension)
    1514             : ZEND_END_ARG_INFO()
    1515             : 
    1516             : ZEND_BEGIN_ARG_INFO_EX(arginfo_phpcredits, 0, 0, 0)
    1517             :         ZEND_ARG_INFO(0, flag)
    1518             : ZEND_END_ARG_INFO()
    1519             : 
    1520             : ZEND_BEGIN_ARG_INFO(arginfo_php_sapi_name, 0)
    1521             : ZEND_END_ARG_INFO()
    1522             : 
    1523             : ZEND_BEGIN_ARG_INFO(arginfo_php_uname, 0)
    1524             : ZEND_END_ARG_INFO()
    1525             : 
    1526             : ZEND_BEGIN_ARG_INFO(arginfo_php_ini_scanned_files, 0)
    1527             : ZEND_END_ARG_INFO()
    1528             : 
    1529             : ZEND_BEGIN_ARG_INFO(arginfo_php_ini_loaded_file, 0)
    1530             : ZEND_END_ARG_INFO()
    1531             : /* }}} */
    1532             : /* {{{ iptc.c */
    1533             : ZEND_BEGIN_ARG_INFO_EX(arginfo_iptcembed, 0, 0, 2)
    1534             :         ZEND_ARG_INFO(0, iptcdata)
    1535             :         ZEND_ARG_INFO(0, jpeg_file_name)
    1536             :         ZEND_ARG_INFO(0, spool)
    1537             : ZEND_END_ARG_INFO()
    1538             : 
    1539             : ZEND_BEGIN_ARG_INFO(arginfo_iptcparse, 0)
    1540             :         ZEND_ARG_INFO(0, iptcdata)
    1541             : ZEND_END_ARG_INFO()
    1542             : /* }}} */
    1543             : /* {{{ lcg.c */
    1544             : ZEND_BEGIN_ARG_INFO(arginfo_lcg_value, 0)
    1545             : ZEND_END_ARG_INFO()
    1546             : /* }}} */
    1547             : /* {{{ levenshtein.c */
    1548             : ZEND_BEGIN_ARG_INFO(arginfo_levenshtein, 0)
    1549             :         ZEND_ARG_INFO(0, str1)
    1550             :         ZEND_ARG_INFO(0, str2)
    1551             :         ZEND_ARG_INFO(0, cost_ins)
    1552             :         ZEND_ARG_INFO(0, cost_rep)
    1553             :         ZEND_ARG_INFO(0, cost_del)
    1554             : ZEND_END_ARG_INFO()
    1555             : /* }}} */
    1556             : /* {{{ link.c */
    1557             : #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
    1558             : ZEND_BEGIN_ARG_INFO(arginfo_readlink, 0)
    1559             :         ZEND_ARG_INFO(0, filename)
    1560             : ZEND_END_ARG_INFO()
    1561             : 
    1562             : ZEND_BEGIN_ARG_INFO(arginfo_linkinfo, 0)
    1563             :         ZEND_ARG_INFO(0, filename)
    1564             : ZEND_END_ARG_INFO()
    1565             : 
    1566             : ZEND_BEGIN_ARG_INFO(arginfo_symlink, 0)
    1567             :         ZEND_ARG_INFO(0, target)
    1568             :         ZEND_ARG_INFO(0, link)
    1569             : ZEND_END_ARG_INFO()
    1570             : 
    1571             : ZEND_BEGIN_ARG_INFO(arginfo_link, 0)
    1572             :         ZEND_ARG_INFO(0, target)
    1573             :         ZEND_ARG_INFO(0, link)
    1574             : ZEND_END_ARG_INFO()
    1575             : #endif
    1576             : /* }}} */
    1577             : /* {{{ mail.c */
    1578             : ZEND_BEGIN_ARG_INFO(arginfo_ezmlm_hash, 0)
    1579             :         ZEND_ARG_INFO(0, addr)
    1580             : ZEND_END_ARG_INFO()
    1581             : 
    1582             : ZEND_BEGIN_ARG_INFO_EX(arginfo_mail, 0, 0, 3)
    1583             :         ZEND_ARG_INFO(0, to)
    1584             :         ZEND_ARG_INFO(0, subject)
    1585             :         ZEND_ARG_INFO(0, message)
    1586             :         ZEND_ARG_INFO(0, additional_headers)
    1587             :         ZEND_ARG_INFO(0, additional_parameters)
    1588             : ZEND_END_ARG_INFO()
    1589             : /* }}} */
    1590             : /* {{{ math.c */
    1591             : ZEND_BEGIN_ARG_INFO(arginfo_abs, 0)
    1592             :         ZEND_ARG_INFO(0, number)
    1593             : ZEND_END_ARG_INFO()
    1594             : 
    1595             : ZEND_BEGIN_ARG_INFO(arginfo_ceil, 0)
    1596             :         ZEND_ARG_INFO(0, number)
    1597             : ZEND_END_ARG_INFO()
    1598             : 
    1599             : ZEND_BEGIN_ARG_INFO(arginfo_floor, 0)
    1600             :         ZEND_ARG_INFO(0, number)
    1601             : ZEND_END_ARG_INFO()
    1602             : 
    1603             : ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1)
    1604             :         ZEND_ARG_INFO(0, number)
    1605             :         ZEND_ARG_INFO(0, precision)
    1606             :         ZEND_ARG_INFO(0, mode)
    1607             : ZEND_END_ARG_INFO()
    1608             : 
    1609             : ZEND_BEGIN_ARG_INFO(arginfo_sin, 0)
    1610             :         ZEND_ARG_INFO(0, number)
    1611             : ZEND_END_ARG_INFO()
    1612             : 
    1613             : ZEND_BEGIN_ARG_INFO(arginfo_cos, 0)
    1614             :         ZEND_ARG_INFO(0, number)
    1615             : ZEND_END_ARG_INFO()
    1616             : 
    1617             : ZEND_BEGIN_ARG_INFO(arginfo_tan, 0)
    1618             :         ZEND_ARG_INFO(0, number)
    1619             : ZEND_END_ARG_INFO()
    1620             : 
    1621             : ZEND_BEGIN_ARG_INFO(arginfo_asin, 0)
    1622             :         ZEND_ARG_INFO(0, number)
    1623             : ZEND_END_ARG_INFO()
    1624             : 
    1625             : ZEND_BEGIN_ARG_INFO(arginfo_acos, 0)
    1626             :         ZEND_ARG_INFO(0, number)
    1627             : ZEND_END_ARG_INFO()
    1628             : 
    1629             : ZEND_BEGIN_ARG_INFO(arginfo_atan, 0)
    1630             :         ZEND_ARG_INFO(0, number)
    1631             : ZEND_END_ARG_INFO()
    1632             : 
    1633             : ZEND_BEGIN_ARG_INFO(arginfo_atan2, 0)
    1634             :         ZEND_ARG_INFO(0, y)
    1635             :         ZEND_ARG_INFO(0, x)
    1636             : ZEND_END_ARG_INFO()
    1637             : 
    1638             : ZEND_BEGIN_ARG_INFO(arginfo_sinh, 0)
    1639             :         ZEND_ARG_INFO(0, number)
    1640             : ZEND_END_ARG_INFO()
    1641             : 
    1642             : ZEND_BEGIN_ARG_INFO(arginfo_cosh, 0)
    1643             :         ZEND_ARG_INFO(0, number)
    1644             : ZEND_END_ARG_INFO()
    1645             : 
    1646             : ZEND_BEGIN_ARG_INFO(arginfo_tanh, 0)
    1647             :         ZEND_ARG_INFO(0, number)
    1648             : ZEND_END_ARG_INFO()
    1649             : 
    1650             : ZEND_BEGIN_ARG_INFO(arginfo_asinh, 0)
    1651             :         ZEND_ARG_INFO(0, number)
    1652             : ZEND_END_ARG_INFO()
    1653             : 
    1654             : ZEND_BEGIN_ARG_INFO(arginfo_acosh, 0)
    1655             :         ZEND_ARG_INFO(0, number)
    1656             : ZEND_END_ARG_INFO()
    1657             : 
    1658             : ZEND_BEGIN_ARG_INFO(arginfo_atanh, 0)
    1659             :         ZEND_ARG_INFO(0, number)
    1660             : ZEND_END_ARG_INFO()
    1661             : 
    1662             : ZEND_BEGIN_ARG_INFO(arginfo_pi, 0)
    1663             : ZEND_END_ARG_INFO()
    1664             : 
    1665             : ZEND_BEGIN_ARG_INFO(arginfo_is_finite, 0)
    1666             :         ZEND_ARG_INFO(0, val)
    1667             : ZEND_END_ARG_INFO()
    1668             : 
    1669             : ZEND_BEGIN_ARG_INFO(arginfo_is_infinite, 0)
    1670             :         ZEND_ARG_INFO(0, val)
    1671             : ZEND_END_ARG_INFO()
    1672             : 
    1673             : ZEND_BEGIN_ARG_INFO(arginfo_is_nan, 0)
    1674             :         ZEND_ARG_INFO(0, val)
    1675             : ZEND_END_ARG_INFO()
    1676             : 
    1677             : ZEND_BEGIN_ARG_INFO(arginfo_pow, 0)
    1678             :         ZEND_ARG_INFO(0, base)
    1679             :         ZEND_ARG_INFO(0, exponent)
    1680             : ZEND_END_ARG_INFO()
    1681             : 
    1682             : ZEND_BEGIN_ARG_INFO(arginfo_exp, 0)
    1683             :         ZEND_ARG_INFO(0, number)
    1684             : ZEND_END_ARG_INFO()
    1685             : 
    1686             : ZEND_BEGIN_ARG_INFO(arginfo_expm1, 0)
    1687             :         ZEND_ARG_INFO(0, number)
    1688             : ZEND_END_ARG_INFO()
    1689             : 
    1690             : ZEND_BEGIN_ARG_INFO(arginfo_log1p, 0)
    1691             :         ZEND_ARG_INFO(0, number)
    1692             : ZEND_END_ARG_INFO()
    1693             : 
    1694             : ZEND_BEGIN_ARG_INFO_EX(arginfo_log, 0, 0, 1)
    1695             :         ZEND_ARG_INFO(0, number)
    1696             :         ZEND_ARG_INFO(0, base)
    1697             : ZEND_END_ARG_INFO()
    1698             : 
    1699             : ZEND_BEGIN_ARG_INFO(arginfo_log10, 0)
    1700             :         ZEND_ARG_INFO(0, number)
    1701             : ZEND_END_ARG_INFO()
    1702             : 
    1703             : ZEND_BEGIN_ARG_INFO(arginfo_sqrt, 0)
    1704             :         ZEND_ARG_INFO(0, number)
    1705             : ZEND_END_ARG_INFO()
    1706             : 
    1707             : ZEND_BEGIN_ARG_INFO(arginfo_hypot, 0)
    1708             :         ZEND_ARG_INFO(0, num1)
    1709             :         ZEND_ARG_INFO(0, num2)
    1710             : ZEND_END_ARG_INFO()
    1711             : 
    1712             : ZEND_BEGIN_ARG_INFO(arginfo_deg2rad, 0)
    1713             :         ZEND_ARG_INFO(0, number)
    1714             : ZEND_END_ARG_INFO()
    1715             : 
    1716             : ZEND_BEGIN_ARG_INFO(arginfo_rad2deg, 0)
    1717             :         ZEND_ARG_INFO(0, number)
    1718             : ZEND_END_ARG_INFO()
    1719             : 
    1720             : ZEND_BEGIN_ARG_INFO(arginfo_bindec, 0)
    1721             :         ZEND_ARG_INFO(0, binary_number)
    1722             : ZEND_END_ARG_INFO()
    1723             : 
    1724             : ZEND_BEGIN_ARG_INFO(arginfo_hexdec, 0)
    1725             :         ZEND_ARG_INFO(0, hexadecimal_number)
    1726             : ZEND_END_ARG_INFO()
    1727             : 
    1728             : ZEND_BEGIN_ARG_INFO(arginfo_octdec, 0)
    1729             :         ZEND_ARG_INFO(0, octal_number)
    1730             : ZEND_END_ARG_INFO()
    1731             : 
    1732             : ZEND_BEGIN_ARG_INFO(arginfo_decbin, 0)
    1733             :         ZEND_ARG_INFO(0, decimal_number)
    1734             : ZEND_END_ARG_INFO()
    1735             : 
    1736             : ZEND_BEGIN_ARG_INFO(arginfo_decoct, 0)
    1737             :         ZEND_ARG_INFO(0, decimal_number)
    1738             : ZEND_END_ARG_INFO()
    1739             : 
    1740             : ZEND_BEGIN_ARG_INFO(arginfo_dechex, 0)
    1741             :         ZEND_ARG_INFO(0, decimal_number)
    1742             : ZEND_END_ARG_INFO()
    1743             : 
    1744             : ZEND_BEGIN_ARG_INFO(arginfo_base_convert, 0)
    1745             :         ZEND_ARG_INFO(0, number)
    1746             :         ZEND_ARG_INFO(0, frombase)
    1747             :         ZEND_ARG_INFO(0, tobase)
    1748             : ZEND_END_ARG_INFO()
    1749             : 
    1750             : ZEND_BEGIN_ARG_INFO_EX(arginfo_number_format, 0, 0, 1)
    1751             :         ZEND_ARG_INFO(0, number)
    1752             :         ZEND_ARG_INFO(0, num_decimal_places)
    1753             :         ZEND_ARG_INFO(0, dec_separator)
    1754             :         ZEND_ARG_INFO(0, thousands_separator)
    1755             : ZEND_END_ARG_INFO()
    1756             : 
    1757             : ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
    1758             :         ZEND_ARG_INFO(0, x)
    1759             :         ZEND_ARG_INFO(0, y)
    1760             : ZEND_END_ARG_INFO()
    1761             : /* }}} */
    1762             : /* {{{ md5.c */
    1763             : ZEND_BEGIN_ARG_INFO_EX(arginfo_md5, 0, 0, 1)
    1764             :         ZEND_ARG_INFO(0, str)
    1765             :         ZEND_ARG_INFO(0, raw_output)
    1766             : ZEND_END_ARG_INFO()
    1767             : 
    1768             : ZEND_BEGIN_ARG_INFO_EX(arginfo_md5_file, 0, 0, 1)
    1769             :         ZEND_ARG_INFO(0, filename)
    1770             :         ZEND_ARG_INFO(0, raw_output)
    1771             : ZEND_END_ARG_INFO()
    1772             : /* }}} */
    1773             : /* {{{ metaphone.c */
    1774             : ZEND_BEGIN_ARG_INFO_EX(arginfo_metaphone, 0, 0, 1)
    1775             :         ZEND_ARG_INFO(0, text)
    1776             :         ZEND_ARG_INFO(0, phones)
    1777             : ZEND_END_ARG_INFO()
    1778             : /* }}} */
    1779             : /* {{{ microtime.c */
    1780             : #ifdef HAVE_GETTIMEOFDAY
    1781             : ZEND_BEGIN_ARG_INFO_EX(arginfo_microtime, 0, 0, 0)
    1782             :         ZEND_ARG_INFO(0, get_as_float)
    1783             : ZEND_END_ARG_INFO()
    1784             : 
    1785             : ZEND_BEGIN_ARG_INFO_EX(arginfo_gettimeofday, 0, 0, 0)
    1786             :         ZEND_ARG_INFO(0, get_as_float)
    1787             : ZEND_END_ARG_INFO()
    1788             : #endif
    1789             : 
    1790             : #ifdef HAVE_GETRUSAGE
    1791             : ZEND_BEGIN_ARG_INFO_EX(arginfo_getrusage, 0, 0, 0)
    1792             :         ZEND_ARG_INFO(0, who)
    1793             : ZEND_END_ARG_INFO()
    1794             : #endif
    1795             : /* }}} */
    1796             : /* {{{ pack.c */
    1797             : ZEND_BEGIN_ARG_INFO_EX(arginfo_pack, 0, 0, 2)
    1798             :         ZEND_ARG_INFO(0, format)
    1799             :         ZEND_ARG_VARIADIC_INFO(0, args)
    1800             : ZEND_END_ARG_INFO()
    1801             : 
    1802             : ZEND_BEGIN_ARG_INFO(arginfo_unpack, 0)
    1803             :         ZEND_ARG_INFO(0, format)
    1804             :         ZEND_ARG_INFO(0, input)
    1805             : ZEND_END_ARG_INFO()
    1806             : /* }}} */
    1807             : /* {{{ pageinfo.c */
    1808             : ZEND_BEGIN_ARG_INFO(arginfo_getmyuid, 0)
    1809             : ZEND_END_ARG_INFO()
    1810             : 
    1811             : ZEND_BEGIN_ARG_INFO(arginfo_getmygid, 0)
    1812             : ZEND_END_ARG_INFO()
    1813             : 
    1814             : ZEND_BEGIN_ARG_INFO(arginfo_getmypid, 0)
    1815             : ZEND_END_ARG_INFO()
    1816             : 
    1817             : ZEND_BEGIN_ARG_INFO(arginfo_getmyinode, 0)
    1818             : ZEND_END_ARG_INFO()
    1819             : 
    1820             : ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0)
    1821             : ZEND_END_ARG_INFO()
    1822             : /* }}} */
    1823             : /* {{{ password.c */
    1824             : ZEND_BEGIN_ARG_INFO_EX(arginfo_password_hash, 0, 0, 2)
    1825             :         ZEND_ARG_INFO(0, password)
    1826             :         ZEND_ARG_INFO(0, algo)
    1827             :         ZEND_ARG_INFO(0, options)
    1828             : ZEND_END_ARG_INFO()
    1829             : ZEND_BEGIN_ARG_INFO_EX(arginfo_password_get_info, 0, 0, 1)
    1830             :         ZEND_ARG_INFO(0, hash)
    1831             : ZEND_END_ARG_INFO()
    1832             : ZEND_BEGIN_ARG_INFO_EX(arginfo_password_needs_rehash, 0, 0, 2)
    1833             :         ZEND_ARG_INFO(0, hash)
    1834             :         ZEND_ARG_INFO(0, algo)
    1835             :         ZEND_ARG_INFO(0, options)
    1836             : ZEND_END_ARG_INFO()
    1837             : ZEND_BEGIN_ARG_INFO_EX(arginfo_password_verify, 0, 0, 2)
    1838             :         ZEND_ARG_INFO(0, password)
    1839             :         ZEND_ARG_INFO(0, hash)
    1840             : ZEND_END_ARG_INFO()
    1841             : /* }}} */
    1842             : /* {{{ proc_open.c */
    1843             : #ifdef PHP_CAN_SUPPORT_PROC_OPEN
    1844             : ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_terminate, 0, 0, 1)
    1845             :         ZEND_ARG_INFO(0, process)
    1846             :         ZEND_ARG_INFO(0, signal)
    1847             : ZEND_END_ARG_INFO()
    1848             : 
    1849             : ZEND_BEGIN_ARG_INFO(arginfo_proc_close, 0)
    1850             :         ZEND_ARG_INFO(0, process)
    1851             : ZEND_END_ARG_INFO()
    1852             : 
    1853             : ZEND_BEGIN_ARG_INFO(arginfo_proc_get_status, 0)
    1854             :         ZEND_ARG_INFO(0, process)
    1855             : ZEND_END_ARG_INFO()
    1856             : 
    1857             : ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_open, 0, 0, 3)
    1858             :         ZEND_ARG_INFO(0, command)
    1859             :         ZEND_ARG_INFO(0, descriptorspec) /* ARRAY_INFO(0, descriptorspec, 1) */
    1860             :         ZEND_ARG_INFO(1, pipes) /* ARRAY_INFO(1, pipes, 1) */
    1861             :         ZEND_ARG_INFO(0, cwd)
    1862             :         ZEND_ARG_INFO(0, env) /* ARRAY_INFO(0, env, 1) */
    1863             :         ZEND_ARG_INFO(0, other_options) /* ARRAY_INFO(0, other_options, 1) */
    1864             : ZEND_END_ARG_INFO()
    1865             : #endif
    1866             : /* }}} */
    1867             : /* {{{ quot_print.c */
    1868             : ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_decode, 0)
    1869             :         ZEND_ARG_INFO(0, str)
    1870             : ZEND_END_ARG_INFO()
    1871             : /* }}} */
    1872             : /* {{{ quot_print.c */
    1873             : ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_encode, 0)
    1874             :         ZEND_ARG_INFO(0, str)
    1875             : ZEND_END_ARG_INFO()
    1876             : /* }}} */
    1877             : /* {{{ rand.c */
    1878             : ZEND_BEGIN_ARG_INFO_EX(arginfo_srand, 0, 0, 0)
    1879             :         ZEND_ARG_INFO(0, seed)
    1880             : ZEND_END_ARG_INFO()
    1881             : 
    1882             : ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_srand, 0, 0, 0)
    1883             :         ZEND_ARG_INFO(0, seed)
    1884             : ZEND_END_ARG_INFO()
    1885             : 
    1886             : ZEND_BEGIN_ARG_INFO_EX(arginfo_rand, 0, 0, 0)
    1887             :         ZEND_ARG_INFO(0, min)
    1888             :         ZEND_ARG_INFO(0, max)
    1889             : ZEND_END_ARG_INFO()
    1890             : 
    1891             : ZEND_BEGIN_ARG_INFO_EX(arginfo_mt_rand, 0, 0, 0)
    1892             :         ZEND_ARG_INFO(0, min)
    1893             :         ZEND_ARG_INFO(0, max)
    1894             : ZEND_END_ARG_INFO()
    1895             : 
    1896             : ZEND_BEGIN_ARG_INFO(arginfo_getrandmax, 0)
    1897             : ZEND_END_ARG_INFO()
    1898             : 
    1899             : ZEND_BEGIN_ARG_INFO(arginfo_mt_getrandmax, 0)
    1900             : ZEND_END_ARG_INFO()
    1901             : /* }}} */
    1902             : /* {{{ sha1.c */
    1903             : ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1, 0, 0, 1)
    1904             :         ZEND_ARG_INFO(0, str)
    1905             :         ZEND_ARG_INFO(0, raw_output)
    1906             : ZEND_END_ARG_INFO()
    1907             : 
    1908             : ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1_file, 0, 0, 1)
    1909             :         ZEND_ARG_INFO(0, filename)
    1910             :         ZEND_ARG_INFO(0, raw_output)
    1911             : ZEND_END_ARG_INFO()
    1912             : /* }}} */
    1913             : /* {{{ soundex.c */
    1914             : ZEND_BEGIN_ARG_INFO(arginfo_soundex, 0)
    1915             :         ZEND_ARG_INFO(0, str)
    1916             : ZEND_END_ARG_INFO()
    1917             : /* }}} */
    1918             : /* {{{ streamsfuncs.c */
    1919             : #if HAVE_SOCKETPAIR
    1920             : ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_pair, 0)
    1921             :         ZEND_ARG_INFO(0, domain)
    1922             :         ZEND_ARG_INFO(0, type)
    1923             :         ZEND_ARG_INFO(0, protocol)
    1924             : ZEND_END_ARG_INFO()
    1925             : #endif
    1926             : 
    1927             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1)
    1928             :         ZEND_ARG_INFO(0, remoteaddress)
    1929             :         ZEND_ARG_INFO(1, errcode)
    1930             :         ZEND_ARG_INFO(1, errstring)
    1931             :         ZEND_ARG_INFO(0, timeout)
    1932             :         ZEND_ARG_INFO(0, flags)
    1933             :         ZEND_ARG_INFO(0, context)
    1934             : ZEND_END_ARG_INFO()
    1935             : 
    1936             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1)
    1937             :         ZEND_ARG_INFO(0, localaddress)
    1938             :         ZEND_ARG_INFO(1, errcode)
    1939             :         ZEND_ARG_INFO(1, errstring)
    1940             :         ZEND_ARG_INFO(0, flags)
    1941             :         ZEND_ARG_INFO(0, context)
    1942             : ZEND_END_ARG_INFO()
    1943             : 
    1944             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1)
    1945             :         ZEND_ARG_INFO(0, serverstream)
    1946             :         ZEND_ARG_INFO(0, timeout)
    1947             :         ZEND_ARG_INFO(1, peername)
    1948             : ZEND_END_ARG_INFO()
    1949             : 
    1950             : ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_get_name, 0)
    1951             :         ZEND_ARG_INFO(0, stream)
    1952             :         ZEND_ARG_INFO(0, want_peer)
    1953             : ZEND_END_ARG_INFO()
    1954             : 
    1955             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_sendto, 0, 0, 2)
    1956             :         ZEND_ARG_INFO(0, stream)
    1957             :         ZEND_ARG_INFO(0, data)
    1958             :         ZEND_ARG_INFO(0, flags)
    1959             :         ZEND_ARG_INFO(0, target_addr)
    1960             : ZEND_END_ARG_INFO()
    1961             : 
    1962             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_recvfrom, 0, 0, 2)
    1963             :         ZEND_ARG_INFO(0, stream)
    1964             :         ZEND_ARG_INFO(0, amount)
    1965             :         ZEND_ARG_INFO(0, flags)
    1966             :         ZEND_ARG_INFO(1, remote_addr)
    1967             : ZEND_END_ARG_INFO()
    1968             : 
    1969             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_contents, 0, 0, 1)
    1970             :         ZEND_ARG_INFO(0, source)
    1971             :         ZEND_ARG_INFO(0, maxlen)
    1972             :         ZEND_ARG_INFO(0, offset)
    1973             : ZEND_END_ARG_INFO()
    1974             : 
    1975             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_copy_to_stream, 0, 0, 2)
    1976             :         ZEND_ARG_INFO(0, source)
    1977             :         ZEND_ARG_INFO(0, dest)
    1978             :         ZEND_ARG_INFO(0, maxlen)
    1979             :         ZEND_ARG_INFO(0, pos)
    1980             : ZEND_END_ARG_INFO()
    1981             : 
    1982             : ZEND_BEGIN_ARG_INFO(arginfo_stream_get_meta_data, 0)
    1983             :         ZEND_ARG_INFO(0, fp)
    1984             : ZEND_END_ARG_INFO()
    1985             : 
    1986             : ZEND_BEGIN_ARG_INFO(arginfo_stream_get_transports, 0)
    1987             : ZEND_END_ARG_INFO()
    1988             : 
    1989             : ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0)
    1990             : ZEND_END_ARG_INFO()
    1991             : 
    1992             : ZEND_BEGIN_ARG_INFO(arginfo_stream_resolve_include_path, 0)
    1993             :         ZEND_ARG_INFO(0, filename)
    1994             : ZEND_END_ARG_INFO()
    1995             : 
    1996             : ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0)
    1997             :         ZEND_ARG_INFO(0, stream)
    1998             : ZEND_END_ARG_INFO()
    1999             : 
    2000             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_supports_lock, 0, 0, 1)
    2001             :     ZEND_ARG_INFO(0, stream)
    2002             : ZEND_END_ARG_INFO()
    2003             : 
    2004             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4)
    2005             :         ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */
    2006             :         ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */
    2007             :         ZEND_ARG_INFO(1, except_streams) /* ARRAY_INFO(1, except_streams, 1) */
    2008             :         ZEND_ARG_INFO(0, tv_sec)
    2009             :         ZEND_ARG_INFO(0, tv_usec)
    2010             : ZEND_END_ARG_INFO()
    2011             : 
    2012             : ZEND_BEGIN_ARG_INFO(arginfo_stream_context_get_options, 0)
    2013             :         ZEND_ARG_INFO(0, stream_or_context)
    2014             : ZEND_END_ARG_INFO()
    2015             : 
    2016             : ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_option, 0)
    2017             :         ZEND_ARG_INFO(0, stream_or_context)
    2018             :         ZEND_ARG_INFO(0, wrappername)
    2019             :         ZEND_ARG_INFO(0, optionname)
    2020             :         ZEND_ARG_INFO(0, value)
    2021             : ZEND_END_ARG_INFO()
    2022             : 
    2023             : ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_params, 0)
    2024             :         ZEND_ARG_INFO(0, stream_or_context)
    2025             :         ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
    2026             : ZEND_END_ARG_INFO()
    2027             : 
    2028             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_params, 0, ZEND_RETURN_VALUE, 1)
    2029             :         ZEND_ARG_INFO(0, stream_or_context)
    2030             : ZEND_END_ARG_INFO()
    2031             : 
    2032             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0)
    2033             :         ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
    2034             : ZEND_END_ARG_INFO()
    2035             : 
    2036             : ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_default, 0)
    2037             :         ZEND_ARG_INFO(0, options)
    2038             : ZEND_END_ARG_INFO()
    2039             : 
    2040             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0)
    2041             :         ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
    2042             :         ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */
    2043             : ZEND_END_ARG_INFO()
    2044             : 
    2045             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2)
    2046             :         ZEND_ARG_INFO(0, stream)
    2047             :         ZEND_ARG_INFO(0, filtername)
    2048             :         ZEND_ARG_INFO(0, read_write)
    2049             :         ZEND_ARG_INFO(0, filterparams)
    2050             : ZEND_END_ARG_INFO()
    2051             : 
    2052             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_append, 0, 0, 2)
    2053             :         ZEND_ARG_INFO(0, stream)
    2054             :         ZEND_ARG_INFO(0, filtername)
    2055             :         ZEND_ARG_INFO(0, read_write)
    2056             :         ZEND_ARG_INFO(0, filterparams)
    2057             : ZEND_END_ARG_INFO()
    2058             : 
    2059             : ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_remove, 0)
    2060             :         ZEND_ARG_INFO(0, stream_filter)
    2061             : ZEND_END_ARG_INFO()
    2062             : 
    2063             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_line, 0, 0, 2)
    2064             :         ZEND_ARG_INFO(0, stream)
    2065             :         ZEND_ARG_INFO(0, maxlen)
    2066             :         ZEND_ARG_INFO(0, ending)
    2067             : ZEND_END_ARG_INFO()
    2068             : 
    2069             : ZEND_BEGIN_ARG_INFO(arginfo_stream_set_blocking, 0)
    2070             :         ZEND_ARG_INFO(0, socket)
    2071             :         ZEND_ARG_INFO(0, mode)
    2072             : ZEND_END_ARG_INFO()
    2073             : 
    2074             : #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
    2075             : ZEND_BEGIN_ARG_INFO(arginfo_stream_set_timeout, 0)
    2076             :         ZEND_ARG_INFO(0, stream)
    2077             :         ZEND_ARG_INFO(0, seconds)
    2078             :         ZEND_ARG_INFO(0, microseconds)
    2079             : ZEND_END_ARG_INFO()
    2080             : #endif
    2081             : 
    2082             : ZEND_BEGIN_ARG_INFO(arginfo_stream_set_read_buffer, 0)
    2083             :         ZEND_ARG_INFO(0, fp)
    2084             :         ZEND_ARG_INFO(0, buffer)
    2085             : ZEND_END_ARG_INFO()
    2086             : 
    2087             : ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0)
    2088             :         ZEND_ARG_INFO(0, fp)
    2089             :         ZEND_ARG_INFO(0, buffer)
    2090             : ZEND_END_ARG_INFO()
    2091             :                 
    2092             : ZEND_BEGIN_ARG_INFO(arginfo_stream_set_chunk_size, 0)
    2093             :         ZEND_ARG_INFO(0, fp)
    2094             :         ZEND_ARG_INFO(0, chunk_size)
    2095             : ZEND_END_ARG_INFO()
    2096             : 
    2097             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_enable_crypto, 0, 0, 2)
    2098             :         ZEND_ARG_INFO(0, stream)
    2099             :         ZEND_ARG_INFO(0, enable)
    2100             :         ZEND_ARG_INFO(0, cryptokind)
    2101             :         ZEND_ARG_INFO(0, sessionstream)
    2102             : ZEND_END_ARG_INFO()
    2103             : 
    2104             : #ifdef HAVE_SHUTDOWN
    2105             : ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_shutdown, 0)
    2106             :         ZEND_ARG_INFO(0, stream)
    2107             :         ZEND_ARG_INFO(0, how)
    2108             : ZEND_END_ARG_INFO()
    2109             : #endif
    2110             : /* }}} */
    2111             : /* {{{ string.c */
    2112             : ZEND_BEGIN_ARG_INFO(arginfo_bin2hex, 0)
    2113             :         ZEND_ARG_INFO(0, data)
    2114             : ZEND_END_ARG_INFO()
    2115             : 
    2116             : ZEND_BEGIN_ARG_INFO(arginfo_hex2bin, 0)
    2117             :         ZEND_ARG_INFO(0, data)
    2118             : ZEND_END_ARG_INFO()
    2119             : 
    2120             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strspn, 0, 0, 2)
    2121             :         ZEND_ARG_INFO(0, str)
    2122             :         ZEND_ARG_INFO(0, mask)
    2123             :         ZEND_ARG_INFO(0, start)
    2124             :         ZEND_ARG_INFO(0, len)
    2125             : ZEND_END_ARG_INFO()
    2126             : 
    2127             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strcspn, 0, 0, 2)
    2128             :         ZEND_ARG_INFO(0, str)
    2129             :         ZEND_ARG_INFO(0, mask)
    2130             :         ZEND_ARG_INFO(0, start)
    2131             :         ZEND_ARG_INFO(0, len)
    2132             : ZEND_END_ARG_INFO()
    2133             : 
    2134             : #if HAVE_NL_LANGINFO
    2135             : ZEND_BEGIN_ARG_INFO(arginfo_nl_langinfo, 0)
    2136             :         ZEND_ARG_INFO(0, item)
    2137             : ZEND_END_ARG_INFO()
    2138             : #endif
    2139             : 
    2140             : #ifdef HAVE_STRCOLL
    2141             : ZEND_BEGIN_ARG_INFO(arginfo_strcoll, 0)
    2142             :         ZEND_ARG_INFO(0, str1)
    2143             :         ZEND_ARG_INFO(0, str2)
    2144             : ZEND_END_ARG_INFO()
    2145             : #endif
    2146             : 
    2147             : ZEND_BEGIN_ARG_INFO_EX(arginfo_trim, 0, 0, 1)
    2148             :         ZEND_ARG_INFO(0, str)
    2149             :         ZEND_ARG_INFO(0, character_mask)
    2150             : ZEND_END_ARG_INFO()
    2151             : 
    2152             : ZEND_BEGIN_ARG_INFO_EX(arginfo_rtrim, 0, 0, 1)
    2153             :         ZEND_ARG_INFO(0, str)
    2154             :         ZEND_ARG_INFO(0, character_mask)
    2155             : ZEND_END_ARG_INFO()
    2156             : 
    2157             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ltrim, 0, 0, 1)
    2158             :         ZEND_ARG_INFO(0, str)
    2159             :         ZEND_ARG_INFO(0, character_mask)
    2160             : ZEND_END_ARG_INFO()
    2161             : 
    2162             : ZEND_BEGIN_ARG_INFO_EX(arginfo_wordwrap, 0, 0, 1)
    2163             :         ZEND_ARG_INFO(0, str)
    2164             :         ZEND_ARG_INFO(0, width)
    2165             :         ZEND_ARG_INFO(0, break)
    2166             :         ZEND_ARG_INFO(0, cut)
    2167             : ZEND_END_ARG_INFO()
    2168             : 
    2169             : ZEND_BEGIN_ARG_INFO_EX(arginfo_explode, 0, 0, 2)
    2170             :         ZEND_ARG_INFO(0, separator)
    2171             :         ZEND_ARG_INFO(0, str)
    2172             :         ZEND_ARG_INFO(0, limit)
    2173             : ZEND_END_ARG_INFO()
    2174             : 
    2175             : ZEND_BEGIN_ARG_INFO(arginfo_implode, 0)
    2176             :         ZEND_ARG_INFO(0, glue)
    2177             :         ZEND_ARG_INFO(0, pieces)
    2178             : ZEND_END_ARG_INFO()
    2179             : 
    2180             : ZEND_BEGIN_ARG_INFO(arginfo_strtok, 0)
    2181             :         ZEND_ARG_INFO(0, str)
    2182             :         ZEND_ARG_INFO(0, token)
    2183             : ZEND_END_ARG_INFO()
    2184             : 
    2185             : ZEND_BEGIN_ARG_INFO(arginfo_strtoupper, 0)
    2186             :         ZEND_ARG_INFO(0, str)
    2187             : ZEND_END_ARG_INFO()
    2188             : 
    2189             : ZEND_BEGIN_ARG_INFO(arginfo_strtolower, 0)
    2190             :         ZEND_ARG_INFO(0, str)
    2191             : ZEND_END_ARG_INFO()
    2192             : 
    2193             : ZEND_BEGIN_ARG_INFO_EX(arginfo_basename, 0, 0, 1)
    2194             :         ZEND_ARG_INFO(0, path)
    2195             :         ZEND_ARG_INFO(0, suffix)
    2196             : ZEND_END_ARG_INFO()
    2197             : 
    2198             : ZEND_BEGIN_ARG_INFO(arginfo_dirname, 0)
    2199             :         ZEND_ARG_INFO(0, path)
    2200             : ZEND_END_ARG_INFO()
    2201             : 
    2202             : ZEND_BEGIN_ARG_INFO_EX(arginfo_pathinfo, 0, 0, 1)
    2203             :         ZEND_ARG_INFO(0, path)
    2204             :         ZEND_ARG_INFO(0, options)
    2205             : ZEND_END_ARG_INFO()
    2206             : 
    2207             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stristr, 0, 0, 2)
    2208             :         ZEND_ARG_INFO(0, haystack)
    2209             :         ZEND_ARG_INFO(0, needle)
    2210             :         ZEND_ARG_INFO(0, part)
    2211             : ZEND_END_ARG_INFO()
    2212             : 
    2213             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strstr, 0, 0, 2)
    2214             :         ZEND_ARG_INFO(0, haystack)
    2215             :         ZEND_ARG_INFO(0, needle)
    2216             :         ZEND_ARG_INFO(0, part)
    2217             : ZEND_END_ARG_INFO()
    2218             : 
    2219             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strpos, 0, 0, 2)
    2220             :         ZEND_ARG_INFO(0, haystack)
    2221             :         ZEND_ARG_INFO(0, needle)
    2222             :         ZEND_ARG_INFO(0, offset)
    2223             : ZEND_END_ARG_INFO()
    2224             : 
    2225             : ZEND_BEGIN_ARG_INFO_EX(arginfo_stripos, 0, 0, 2)
    2226             :         ZEND_ARG_INFO(0, haystack)
    2227             :         ZEND_ARG_INFO(0, needle)
    2228             :         ZEND_ARG_INFO(0, offset)
    2229             : ZEND_END_ARG_INFO()
    2230             : 
    2231             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strrpos, 0, 0, 2)
    2232             :         ZEND_ARG_INFO(0, haystack)
    2233             :         ZEND_ARG_INFO(0, needle)
    2234             :         ZEND_ARG_INFO(0, offset)
    2235             : ZEND_END_ARG_INFO()
    2236             : 
    2237             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strripos, 0, 0, 2)
    2238             :         ZEND_ARG_INFO(0, haystack)
    2239             :         ZEND_ARG_INFO(0, needle)
    2240             :         ZEND_ARG_INFO(0, offset)
    2241             : ZEND_END_ARG_INFO()
    2242             : 
    2243             : ZEND_BEGIN_ARG_INFO(arginfo_strrchr, 0)
    2244             :         ZEND_ARG_INFO(0, haystack)
    2245             :         ZEND_ARG_INFO(0, needle)
    2246             : ZEND_END_ARG_INFO()
    2247             : 
    2248             : ZEND_BEGIN_ARG_INFO_EX(arginfo_chunk_split, 0, 0, 1)
    2249             :         ZEND_ARG_INFO(0, str)
    2250             :         ZEND_ARG_INFO(0, chunklen)
    2251             :         ZEND_ARG_INFO(0, ending)
    2252             : ZEND_END_ARG_INFO()
    2253             : 
    2254             : ZEND_BEGIN_ARG_INFO_EX(arginfo_substr, 0, 0, 2)
    2255             :         ZEND_ARG_INFO(0, str)
    2256             :         ZEND_ARG_INFO(0, start)
    2257             :         ZEND_ARG_INFO(0, length)
    2258             : ZEND_END_ARG_INFO()
    2259             : 
    2260             : ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_replace, 0, 0, 3)
    2261             :         ZEND_ARG_INFO(0, str)
    2262             :         ZEND_ARG_INFO(0, replace)
    2263             :         ZEND_ARG_INFO(0, start)
    2264             :         ZEND_ARG_INFO(0, length)
    2265             : ZEND_END_ARG_INFO()
    2266             : 
    2267             : ZEND_BEGIN_ARG_INFO(arginfo_quotemeta, 0)
    2268             :         ZEND_ARG_INFO(0, str)
    2269             : ZEND_END_ARG_INFO()
    2270             : 
    2271             : ZEND_BEGIN_ARG_INFO(arginfo_ord, 0)
    2272             :         ZEND_ARG_INFO(0, character)
    2273             : ZEND_END_ARG_INFO()
    2274             : 
    2275             : ZEND_BEGIN_ARG_INFO(arginfo_chr, 0)
    2276             :         ZEND_ARG_INFO(0, codepoint)
    2277             : ZEND_END_ARG_INFO()
    2278             : 
    2279             : ZEND_BEGIN_ARG_INFO(arginfo_ucfirst, 0)
    2280             :         ZEND_ARG_INFO(0, str)
    2281             : ZEND_END_ARG_INFO()
    2282             : 
    2283             : ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0)
    2284             :         ZEND_ARG_INFO(0, str)
    2285             : ZEND_END_ARG_INFO()
    2286             :         
    2287             : ZEND_BEGIN_ARG_INFO_EX(arginfo_ucwords, 0, 0, 1)
    2288             :         ZEND_ARG_INFO(0, str)
    2289             :         ZEND_ARG_INFO(0, delimiters)
    2290             : ZEND_END_ARG_INFO()
    2291             : 
    2292             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strtr, 0, 0, 2)
    2293             :         ZEND_ARG_INFO(0, str)
    2294             :         ZEND_ARG_INFO(0, from)
    2295             :         ZEND_ARG_INFO(0, to)
    2296             : ZEND_END_ARG_INFO()
    2297             : 
    2298             : ZEND_BEGIN_ARG_INFO(arginfo_strrev, 0)
    2299             :         ZEND_ARG_INFO(0, str)
    2300             : ZEND_END_ARG_INFO()
    2301             : 
    2302             : ZEND_BEGIN_ARG_INFO_EX(arginfo_similar_text, 0, 0, 2)
    2303             :         ZEND_ARG_INFO(0, str1)
    2304             :         ZEND_ARG_INFO(0, str2)
    2305             :         ZEND_ARG_INFO(1, percent)
    2306             : ZEND_END_ARG_INFO()
    2307             : 
    2308             : ZEND_BEGIN_ARG_INFO(arginfo_addcslashes, 0)
    2309             :         ZEND_ARG_INFO(0, str)
    2310             :         ZEND_ARG_INFO(0, charlist)
    2311             : ZEND_END_ARG_INFO()
    2312             : 
    2313             : ZEND_BEGIN_ARG_INFO(arginfo_addslashes, 0)
    2314             :         ZEND_ARG_INFO(0, str)
    2315             : ZEND_END_ARG_INFO()
    2316             : 
    2317             : ZEND_BEGIN_ARG_INFO(arginfo_stripcslashes, 0)
    2318             :         ZEND_ARG_INFO(0, str)
    2319             : ZEND_END_ARG_INFO()
    2320             : 
    2321             : ZEND_BEGIN_ARG_INFO(arginfo_stripslashes, 0)
    2322             :         ZEND_ARG_INFO(0, str)
    2323             : ZEND_END_ARG_INFO()
    2324             : 
    2325             : ZEND_BEGIN_ARG_INFO_EX(arginfo_str_replace, 0, 0, 3)
    2326             :         ZEND_ARG_INFO(0, search)
    2327             :         ZEND_ARG_INFO(0, replace)
    2328             :         ZEND_ARG_INFO(0, subject)
    2329             :         ZEND_ARG_INFO(1, replace_count)
    2330             : ZEND_END_ARG_INFO()
    2331             : 
    2332             : ZEND_BEGIN_ARG_INFO_EX(arginfo_str_ireplace, 0, 0, 3)
    2333             :         ZEND_ARG_INFO(0, search)
    2334             :         ZEND_ARG_INFO(0, replace)
    2335             :         ZEND_ARG_INFO(0, subject)
    2336             :         ZEND_ARG_INFO(1, replace_count)
    2337             : ZEND_END_ARG_INFO()
    2338             : 
    2339             : ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrev, 0, 0, 1)
    2340             :         ZEND_ARG_INFO(0, str)
    2341             :         ZEND_ARG_INFO(0, max_chars_per_line)
    2342             : ZEND_END_ARG_INFO()
    2343             : 
    2344             : ZEND_BEGIN_ARG_INFO_EX(arginfo_hebrevc, 0, 0, 1)
    2345             :         ZEND_ARG_INFO(0, str)
    2346             :         ZEND_ARG_INFO(0, max_chars_per_line)
    2347             : ZEND_END_ARG_INFO()
    2348             : 
    2349             : ZEND_BEGIN_ARG_INFO_EX(arginfo_nl2br, 0, 0, 1)
    2350             :         ZEND_ARG_INFO(0, str)
    2351             :         ZEND_ARG_INFO(0, is_xhtml)
    2352             : ZEND_END_ARG_INFO()
    2353             : 
    2354             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strip_tags, 0, 0, 1)
    2355             :         ZEND_ARG_INFO(0, str)
    2356             :         ZEND_ARG_INFO(0, allowable_tags)
    2357             : ZEND_END_ARG_INFO()
    2358             : 
    2359             : ZEND_BEGIN_ARG_INFO_EX(arginfo_setlocale, 0, 0, 2)
    2360             :         ZEND_ARG_INFO(0, category)
    2361             :         ZEND_ARG_VARIADIC_INFO(0, locales)
    2362             : ZEND_END_ARG_INFO()
    2363             : 
    2364             : ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_str, 0, 0, 1)
    2365             :         ZEND_ARG_INFO(0, encoded_string)
    2366             :         ZEND_ARG_INFO(1, result)
    2367             : ZEND_END_ARG_INFO()
    2368             : 
    2369             : ZEND_BEGIN_ARG_INFO_EX(arginfo_str_getcsv, 0, 0, 1)
    2370             :         ZEND_ARG_INFO(0, string)
    2371             :         ZEND_ARG_INFO(0, delimiter)
    2372             :         ZEND_ARG_INFO(0, enclosure)
    2373             :         ZEND_ARG_INFO(0, escape)
    2374             : ZEND_END_ARG_INFO()
    2375             : 
    2376             : ZEND_BEGIN_ARG_INFO(arginfo_str_repeat, 0)
    2377             :         ZEND_ARG_INFO(0, input)
    2378             :         ZEND_ARG_INFO(0, mult)
    2379             : ZEND_END_ARG_INFO()
    2380             : 
    2381             : ZEND_BEGIN_ARG_INFO_EX(arginfo_count_chars, 0, 0, 1)
    2382             :         ZEND_ARG_INFO(0, input)
    2383             :         ZEND_ARG_INFO(0, mode)
    2384             : ZEND_END_ARG_INFO()
    2385             : 
    2386             : ZEND_BEGIN_ARG_INFO(arginfo_strnatcmp, 0)
    2387             :         ZEND_ARG_INFO(0, s1)
    2388             :         ZEND_ARG_INFO(0, s2)
    2389             : ZEND_END_ARG_INFO()
    2390             : 
    2391             : ZEND_BEGIN_ARG_INFO(arginfo_localeconv, 0)
    2392             : ZEND_END_ARG_INFO()
    2393             : 
    2394             : ZEND_BEGIN_ARG_INFO(arginfo_strnatcasecmp, 0)
    2395             :         ZEND_ARG_INFO(0, s1)
    2396             :         ZEND_ARG_INFO(0, s2)
    2397             : ZEND_END_ARG_INFO()
    2398             : 
    2399             : ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_count, 0, 0, 2)
    2400             :         ZEND_ARG_INFO(0, haystack)
    2401             :         ZEND_ARG_INFO(0, needle)
    2402             :         ZEND_ARG_INFO(0, offset)
    2403             :         ZEND_ARG_INFO(0, length)
    2404             : ZEND_END_ARG_INFO()
    2405             : 
    2406             : ZEND_BEGIN_ARG_INFO_EX(arginfo_str_pad, 0, 0, 2)
    2407             :         ZEND_ARG_INFO(0, input)
    2408             :         ZEND_ARG_INFO(0, pad_length)
    2409             :         ZEND_ARG_INFO(0, pad_string)
    2410             :         ZEND_ARG_INFO(0, pad_type)
    2411             : ZEND_END_ARG_INFO()
    2412             : 
    2413             : ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 0, 0, 2)
    2414             :         ZEND_ARG_INFO(0, str)
    2415             :         ZEND_ARG_INFO(0, format)
    2416             :         ZEND_ARG_VARIADIC_INFO(1, vars)
    2417             : ZEND_END_ARG_INFO()
    2418             : 
    2419             : ZEND_BEGIN_ARG_INFO(arginfo_str_rot13, 0)
    2420             :         ZEND_ARG_INFO(0, str)
    2421             : ZEND_END_ARG_INFO()
    2422             : 
    2423             : ZEND_BEGIN_ARG_INFO(arginfo_str_shuffle, 0)
    2424             :         ZEND_ARG_INFO(0, str)
    2425             : ZEND_END_ARG_INFO()
    2426             : 
    2427             : ZEND_BEGIN_ARG_INFO_EX(arginfo_str_word_count, 0, 0, 1)
    2428             :         ZEND_ARG_INFO(0, str)
    2429             :         ZEND_ARG_INFO(0, format)
    2430             :         ZEND_ARG_INFO(0, charlist)
    2431             : ZEND_END_ARG_INFO()
    2432             : 
    2433             : #ifdef HAVE_STRFMON
    2434             : ZEND_BEGIN_ARG_INFO(arginfo_money_format, 0)
    2435             :         ZEND_ARG_INFO(0, format)
    2436             :         ZEND_ARG_INFO(0, value)
    2437             : ZEND_END_ARG_INFO()
    2438             : #endif
    2439             : 
    2440             : ZEND_BEGIN_ARG_INFO_EX(arginfo_str_split, 0, 0, 1)
    2441             :         ZEND_ARG_INFO(0, str)
    2442             :         ZEND_ARG_INFO(0, split_length)
    2443             : ZEND_END_ARG_INFO()
    2444             : 
    2445             : ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 1)
    2446             :         ZEND_ARG_INFO(0, haystack)
    2447             :         ZEND_ARG_INFO(0, char_list)
    2448             : ZEND_END_ARG_INFO()
    2449             : 
    2450             : ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_compare, 0, 0, 3)
    2451             :         ZEND_ARG_INFO(0, main_str)
    2452             :         ZEND_ARG_INFO(0, str)
    2453             :         ZEND_ARG_INFO(0, offset)
    2454             :         ZEND_ARG_INFO(0, length)
    2455             :         ZEND_ARG_INFO(0, case_sensitivity)
    2456             : ZEND_END_ARG_INFO()
    2457             : /* }}} */
    2458             : /* {{{ syslog.c */
    2459             : #ifdef HAVE_SYSLOG_H
    2460             : ZEND_BEGIN_ARG_INFO(arginfo_openlog, 0)
    2461             :         ZEND_ARG_INFO(0, ident)
    2462             :         ZEND_ARG_INFO(0, option)
    2463             :         ZEND_ARG_INFO(0, facility)
    2464             : ZEND_END_ARG_INFO()
    2465             : 
    2466             : ZEND_BEGIN_ARG_INFO(arginfo_closelog, 0)
    2467             : ZEND_END_ARG_INFO()
    2468             : 
    2469             : ZEND_BEGIN_ARG_INFO(arginfo_syslog, 0)
    2470             :         ZEND_ARG_INFO(0, priority)
    2471             :         ZEND_ARG_INFO(0, message)
    2472             : ZEND_END_ARG_INFO()
    2473             : #endif
    2474             : /* }}} */
    2475             : /* {{{ type.c */
    2476             : ZEND_BEGIN_ARG_INFO(arginfo_gettype, 0)
    2477             :         ZEND_ARG_INFO(0, var)
    2478             : ZEND_END_ARG_INFO()
    2479             : 
    2480             : ZEND_BEGIN_ARG_INFO(arginfo_settype, 0)
    2481             :         ZEND_ARG_INFO(1, var)
    2482             :         ZEND_ARG_INFO(0, type)
    2483             : ZEND_END_ARG_INFO()
    2484             : 
    2485             : ZEND_BEGIN_ARG_INFO_EX(arginfo_intval, 0, 0, 1)
    2486             :         ZEND_ARG_INFO(0, var)
    2487             :         ZEND_ARG_INFO(0, base)
    2488             : ZEND_END_ARG_INFO()
    2489             : 
    2490             : ZEND_BEGIN_ARG_INFO(arginfo_floatval, 0)
    2491             :         ZEND_ARG_INFO(0, var)
    2492             : ZEND_END_ARG_INFO()
    2493             : 
    2494             : ZEND_BEGIN_ARG_INFO(arginfo_strval, 0)
    2495             :         ZEND_ARG_INFO(0, var)
    2496             : ZEND_END_ARG_INFO()
    2497             : 
    2498             : ZEND_BEGIN_ARG_INFO(arginfo_boolval, 0)
    2499             :         ZEND_ARG_INFO(0, var)
    2500             : ZEND_END_ARG_INFO()
    2501             : 
    2502             : ZEND_BEGIN_ARG_INFO(arginfo_is_null, 0)
    2503             :         ZEND_ARG_INFO(0, var)
    2504             : ZEND_END_ARG_INFO()
    2505             : 
    2506             : ZEND_BEGIN_ARG_INFO(arginfo_is_resource, 0)
    2507             :         ZEND_ARG_INFO(0, var)
    2508             : ZEND_END_ARG_INFO()
    2509             : 
    2510             : ZEND_BEGIN_ARG_INFO(arginfo_is_bool, 0)
    2511             :         ZEND_ARG_INFO(0, var)
    2512             : ZEND_END_ARG_INFO()
    2513             : 
    2514             : ZEND_BEGIN_ARG_INFO(arginfo_is_long, 0)
    2515             :         ZEND_ARG_INFO(0, var)
    2516             : ZEND_END_ARG_INFO()
    2517             : 
    2518             : ZEND_BEGIN_ARG_INFO(arginfo_is_float, 0)
    2519             :         ZEND_ARG_INFO(0, var)
    2520             : ZEND_END_ARG_INFO()
    2521             : 
    2522             : ZEND_BEGIN_ARG_INFO(arginfo_is_string, 0)
    2523             :         ZEND_ARG_INFO(0, var)
    2524             : ZEND_END_ARG_INFO()
    2525             : 
    2526             : ZEND_BEGIN_ARG_INFO(arginfo_is_array, 0)
    2527             :         ZEND_ARG_INFO(0, var)
    2528             : ZEND_END_ARG_INFO()
    2529             : 
    2530             : ZEND_BEGIN_ARG_INFO(arginfo_is_object, 0)
    2531             :         ZEND_ARG_INFO(0, var)
    2532             : ZEND_END_ARG_INFO()
    2533             : 
    2534             : ZEND_BEGIN_ARG_INFO(arginfo_is_numeric, 0)
    2535             :         ZEND_ARG_INFO(0, value)
    2536             : ZEND_END_ARG_INFO()
    2537             : 
    2538             : ZEND_BEGIN_ARG_INFO(arginfo_is_scalar, 0)
    2539             :         ZEND_ARG_INFO(0, value)
    2540             : ZEND_END_ARG_INFO()
    2541             : 
    2542             : ZEND_BEGIN_ARG_INFO_EX(arginfo_is_callable, 0, 0, 1)
    2543             :         ZEND_ARG_INFO(0, var)
    2544             :         ZEND_ARG_INFO(0, syntax_only)
    2545             :         ZEND_ARG_INFO(1, callable_name)
    2546             : ZEND_END_ARG_INFO()
    2547             : /* }}} */
    2548             : /* {{{ uniqid.c */
    2549             : #ifdef HAVE_GETTIMEOFDAY
    2550             : ZEND_BEGIN_ARG_INFO_EX(arginfo_uniqid, 0, 0, 0)
    2551             :         ZEND_ARG_INFO(0, prefix)
    2552             :         ZEND_ARG_INFO(0, more_entropy)
    2553             : ZEND_END_ARG_INFO()
    2554             : #endif
    2555             : /* }}} */
    2556             : /* {{{ url.c */
    2557             : ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1)
    2558             :         ZEND_ARG_INFO(0, url)
    2559             :         ZEND_ARG_INFO(0, component)
    2560             : ZEND_END_ARG_INFO()
    2561             : 
    2562             : ZEND_BEGIN_ARG_INFO(arginfo_urlencode, 0)
    2563             :         ZEND_ARG_INFO(0, str)
    2564             : ZEND_END_ARG_INFO()
    2565             : 
    2566             : ZEND_BEGIN_ARG_INFO(arginfo_urldecode, 0)
    2567             :         ZEND_ARG_INFO(0, str)
    2568             : ZEND_END_ARG_INFO()
    2569             : 
    2570             : ZEND_BEGIN_ARG_INFO(arginfo_rawurlencode, 0)
    2571             :         ZEND_ARG_INFO(0, str)
    2572             : ZEND_END_ARG_INFO()
    2573             : 
    2574             : ZEND_BEGIN_ARG_INFO(arginfo_rawurldecode, 0)
    2575             :         ZEND_ARG_INFO(0, str)
    2576             : ZEND_END_ARG_INFO()
    2577             : 
    2578             : ZEND_BEGIN_ARG_INFO_EX(arginfo_get_headers, 0, 0, 1)
    2579             :         ZEND_ARG_INFO(0, url)
    2580             :         ZEND_ARG_INFO(0, format)
    2581             : ZEND_END_ARG_INFO()
    2582             : /* }}} */
    2583             : /* {{{ user_filters.c */
    2584             : ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_make_writeable, 0)
    2585             :         ZEND_ARG_INFO(0, brigade)
    2586             : ZEND_END_ARG_INFO()
    2587             : 
    2588             : ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_prepend, 0)
    2589             :         ZEND_ARG_INFO(0, brigade)
    2590             :         ZEND_ARG_INFO(0, bucket)
    2591             : ZEND_END_ARG_INFO()
    2592             : 
    2593             : ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_append, 0)
    2594             :         ZEND_ARG_INFO(0, brigade)
    2595             :         ZEND_ARG_INFO(0, bucket)
    2596             : ZEND_END_ARG_INFO()
    2597             : 
    2598             : ZEND_BEGIN_ARG_INFO(arginfo_stream_bucket_new, 0)
    2599             :         ZEND_ARG_INFO(0, stream)
    2600             :         ZEND_ARG_INFO(0, buffer)
    2601             : ZEND_END_ARG_INFO()
    2602             : 
    2603             : ZEND_BEGIN_ARG_INFO(arginfo_stream_get_filters, 0)
    2604             : ZEND_END_ARG_INFO()
    2605             : 
    2606             : ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_register, 0)
    2607             :         ZEND_ARG_INFO(0, filtername)
    2608             :         ZEND_ARG_INFO(0, classname)
    2609             : ZEND_END_ARG_INFO()
    2610             : /* }}} */
    2611             : /* {{{ uuencode.c */
    2612             : ZEND_BEGIN_ARG_INFO(arginfo_convert_uuencode, 0)
    2613             :         ZEND_ARG_INFO(0, data)
    2614             : ZEND_END_ARG_INFO()
    2615             : 
    2616             : ZEND_BEGIN_ARG_INFO(arginfo_convert_uudecode, 0)
    2617             :         ZEND_ARG_INFO(0, data)
    2618             : ZEND_END_ARG_INFO()
    2619             : /* }}} */
    2620             : /* {{{ var.c */
    2621             : ZEND_BEGIN_ARG_INFO_EX(arginfo_var_dump, 0, 0, 1)
    2622             :         ZEND_ARG_VARIADIC_INFO(0, vars)
    2623             : ZEND_END_ARG_INFO()
    2624             : 
    2625             : ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_zval_dump, 0, 0, 1)
    2626             :         ZEND_ARG_VARIADIC_INFO(0, vars)
    2627             : ZEND_END_ARG_INFO()
    2628             : 
    2629             : ZEND_BEGIN_ARG_INFO_EX(arginfo_var_export, 0, 0, 1)
    2630             :         ZEND_ARG_INFO(0, var)
    2631             :         ZEND_ARG_INFO(0, return)
    2632             : ZEND_END_ARG_INFO()
    2633             : 
    2634             : ZEND_BEGIN_ARG_INFO(arginfo_serialize, 0)
    2635             :         ZEND_ARG_INFO(0, var)
    2636             : ZEND_END_ARG_INFO()
    2637             : 
    2638             : ZEND_BEGIN_ARG_INFO(arginfo_unserialize, 0)
    2639             :         ZEND_ARG_INFO(0, variable_representation)
    2640             : ZEND_END_ARG_INFO()
    2641             : 
    2642             : ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_usage, 0, 0, 0)
    2643             :         ZEND_ARG_INFO(0, real_usage)
    2644             : ZEND_END_ARG_INFO()
    2645             : 
    2646             : ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_peak_usage, 0, 0, 0)
    2647             :         ZEND_ARG_INFO(0, real_usage)
    2648             : ZEND_END_ARG_INFO()
    2649             : /* }}} */
    2650             : /* {{{ versioning.c */
    2651             : ZEND_BEGIN_ARG_INFO_EX(arginfo_version_compare, 0, 0, 2)
    2652             :         ZEND_ARG_INFO(0, ver1)
    2653             :         ZEND_ARG_INFO(0, ver2)
    2654             :         ZEND_ARG_INFO(0, oper)
    2655             : ZEND_END_ARG_INFO()
    2656             : /* }}} */
    2657             : /* }}} */
    2658             : 
    2659             : const zend_function_entry basic_functions[] = { /* {{{ */
    2660             :         PHP_FE(constant,                                                                                                                arginfo_constant)
    2661             :         PHP_FE(bin2hex,                                                                                                                 arginfo_bin2hex)
    2662             :         PHP_FE(hex2bin,                                                                                                                 arginfo_hex2bin)
    2663             :         PHP_FE(sleep,                                                                                                                   arginfo_sleep)
    2664             :         PHP_FE(usleep,                                                                                                                  arginfo_usleep)
    2665             : #if HAVE_NANOSLEEP
    2666             :         PHP_FE(time_nanosleep,                                                                                                  arginfo_time_nanosleep)
    2667             :         PHP_FE(time_sleep_until,                                                                                                arginfo_time_sleep_until)
    2668             : #endif
    2669             : 
    2670             : #if HAVE_STRPTIME
    2671             :         PHP_FE(strptime,                                                                                                                arginfo_strptime)
    2672             : #endif
    2673             : 
    2674             :         PHP_FE(flush,                                                                                                                   arginfo_flush)
    2675             :         PHP_FE(wordwrap,                                                                                                                arginfo_wordwrap)
    2676             :         PHP_FE(htmlspecialchars,                                                                                                arginfo_htmlspecialchars)
    2677             :         PHP_FE(htmlentities,                                                                                                    arginfo_htmlentities)
    2678             :         PHP_FE(html_entity_decode,                                                                                              arginfo_html_entity_decode)
    2679             :         PHP_FE(htmlspecialchars_decode,                                                                                 arginfo_htmlspecialchars_decode)
    2680             :         PHP_FE(get_html_translation_table,                                                                              arginfo_get_html_translation_table)
    2681             :         PHP_FE(sha1,                                                                                                                    arginfo_sha1)
    2682             :         PHP_FE(sha1_file,                                                                                                               arginfo_sha1_file)
    2683             :         PHP_NAMED_FE(md5,php_if_md5,                                                                                    arginfo_md5)
    2684             :         PHP_NAMED_FE(md5_file,php_if_md5_file,                                                                  arginfo_md5_file)
    2685             :         PHP_NAMED_FE(crc32,php_if_crc32,                                                                                arginfo_crc32)
    2686             : 
    2687             :         PHP_FE(iptcparse,                                                                                                               arginfo_iptcparse)
    2688             :         PHP_FE(iptcembed,                                                                                                               arginfo_iptcembed)
    2689             :         PHP_FE(getimagesize,                                                                                                    arginfo_getimagesize)
    2690             :         PHP_FE(getimagesizefromstring,                                                                                  arginfo_getimagesize)
    2691             :         PHP_FE(image_type_to_mime_type,                                                                                 arginfo_image_type_to_mime_type)
    2692             :         PHP_FE(image_type_to_extension,                                                                                 arginfo_image_type_to_extension)
    2693             : 
    2694             :         PHP_FE(phpinfo,                                                                                                                 arginfo_phpinfo)
    2695             :         PHP_FE(phpversion,                                                                                                              arginfo_phpversion)
    2696             :         PHP_FE(phpcredits,                                                                                                              arginfo_phpcredits)
    2697             :         PHP_FE(php_sapi_name,                                                                                                   arginfo_php_sapi_name)
    2698             :         PHP_FE(php_uname,                                                                                                               arginfo_php_uname)
    2699             :         PHP_FE(php_ini_scanned_files,                                                                                   arginfo_php_ini_scanned_files)
    2700             :         PHP_FE(php_ini_loaded_file,                                                                                             arginfo_php_ini_loaded_file)
    2701             : 
    2702             :         PHP_FE(strnatcmp,                                                                                                               arginfo_strnatcmp)
    2703             :         PHP_FE(strnatcasecmp,                                                                                                   arginfo_strnatcasecmp)
    2704             :         PHP_FE(substr_count,                                                                                                    arginfo_substr_count)
    2705             :         PHP_FE(strspn,                                                                                                                  arginfo_strspn)
    2706             :         PHP_FE(strcspn,                                                                                                                 arginfo_strcspn)
    2707             :         PHP_FE(strtok,                                                                                                                  arginfo_strtok)
    2708             :         PHP_FE(strtoupper,                                                                                                              arginfo_strtoupper)
    2709             :         PHP_FE(strtolower,                                                                                                              arginfo_strtolower)
    2710             :         PHP_FE(strpos,                                                                                                                  arginfo_strpos)
    2711             :         PHP_FE(stripos,                                                                                                                 arginfo_stripos)
    2712             :         PHP_FE(strrpos,                                                                                                                 arginfo_strrpos)
    2713             :         PHP_FE(strripos,                                                                                                                arginfo_strripos)
    2714             :         PHP_FE(strrev,                                                                                                                  arginfo_strrev)
    2715             :         PHP_FE(hebrev,                                                                                                                  arginfo_hebrev)
    2716             :         PHP_FE(hebrevc,                                                                                                                 arginfo_hebrevc)
    2717             :         PHP_FE(nl2br,                                                                                                                   arginfo_nl2br)
    2718             :         PHP_FE(basename,                                                                                                                arginfo_basename)
    2719             :         PHP_FE(dirname,                                                                                                                 arginfo_dirname)
    2720             :         PHP_FE(pathinfo,                                                                                                                arginfo_pathinfo)
    2721             :         PHP_FE(stripslashes,                                                                                                    arginfo_stripslashes)
    2722             :         PHP_FE(stripcslashes,                                                                                                   arginfo_stripcslashes)
    2723             :         PHP_FE(strstr,                                                                                                                  arginfo_strstr)
    2724             :         PHP_FE(stristr,                                                                                                                 arginfo_stristr)
    2725             :         PHP_FE(strrchr,                                                                                                                 arginfo_strrchr)
    2726             :         PHP_FE(str_shuffle,                                                                                                             arginfo_str_shuffle)
    2727             :         PHP_FE(str_word_count,                                                                                                  arginfo_str_word_count)
    2728             :         PHP_FE(str_split,                                                                                                               arginfo_str_split)
    2729             :         PHP_FE(strpbrk,                                                                                                                 arginfo_strpbrk)
    2730             :         PHP_FE(substr_compare,                                                                                                  arginfo_substr_compare)
    2731             : 
    2732             : #ifdef HAVE_STRCOLL
    2733             :         PHP_FE(strcoll,                                                                                                                 arginfo_strcoll)
    2734             : #endif
    2735             : 
    2736             : #ifdef HAVE_STRFMON
    2737             :         PHP_FE(money_format,                                                                                                    arginfo_money_format)
    2738             : #endif
    2739             : 
    2740             :         PHP_FE(substr,                                                                                                                  arginfo_substr)
    2741             :         PHP_FE(substr_replace,                                                                                                  arginfo_substr_replace)
    2742             :         PHP_FE(quotemeta,                                                                                                               arginfo_quotemeta)
    2743             :         PHP_FE(ucfirst,                                                                                                                 arginfo_ucfirst)
    2744             :         PHP_FE(lcfirst,                                                                                                                 arginfo_lcfirst)
    2745             :         PHP_FE(ucwords,                                                                                                                 arginfo_ucwords)
    2746             :         PHP_FE(strtr,                                                                                                                   arginfo_strtr)
    2747             :         PHP_FE(addslashes,                                                                                                              arginfo_addslashes)
    2748             :         PHP_FE(addcslashes,                                                                                                             arginfo_addcslashes)
    2749             :         PHP_FE(rtrim,                                                                                                                   arginfo_rtrim)
    2750             :         PHP_FE(str_replace,                                                                                                             arginfo_str_replace)
    2751             :         PHP_FE(str_ireplace,                                                                                                    arginfo_str_ireplace)
    2752             :         PHP_FE(str_repeat,                                                                                                              arginfo_str_repeat)
    2753             :         PHP_FE(count_chars,                                                                                                             arginfo_count_chars)
    2754             :         PHP_FE(chunk_split,                                                                                                             arginfo_chunk_split)
    2755             :         PHP_FE(trim,                                                                                                                    arginfo_trim)
    2756             :         PHP_FE(ltrim,                                                                                                                   arginfo_ltrim)
    2757             :         PHP_FE(strip_tags,                                                                                                              arginfo_strip_tags)
    2758             :         PHP_FE(similar_text,                                                                                                    arginfo_similar_text)
    2759             :         PHP_FE(explode,                                                                                                                 arginfo_explode)
    2760             :         PHP_FE(implode,                                                                                                                 arginfo_implode)
    2761             :         PHP_FALIAS(join,                                implode,                                                                arginfo_implode)
    2762             :         PHP_FE(setlocale,                                                                                                               arginfo_setlocale)
    2763             :         PHP_FE(localeconv,                                                                                                              arginfo_localeconv)
    2764             : 
    2765             : #if HAVE_NL_LANGINFO
    2766             :         PHP_FE(nl_langinfo,                                                                                                             arginfo_nl_langinfo)
    2767             : #endif
    2768             : 
    2769             :         PHP_FE(soundex,                                                                                                                 arginfo_soundex)
    2770             :         PHP_FE(levenshtein,                                                                                                             arginfo_levenshtein)
    2771             :         PHP_FE(chr,                                                                                                                             arginfo_chr)
    2772             :         PHP_FE(ord,                                                                                                                             arginfo_ord)
    2773             :         PHP_FE(parse_str,                                                                                                               arginfo_parse_str)
    2774             :         PHP_FE(str_getcsv,                                                                                                              arginfo_str_getcsv)
    2775             :         PHP_FE(str_pad,                                                                                                                 arginfo_str_pad)
    2776             :         PHP_FALIAS(chop,                                rtrim,                                                                  arginfo_rtrim)
    2777             :         PHP_FALIAS(strchr,                              strstr,                                                                 arginfo_strstr)
    2778             :         PHP_NAMED_FE(sprintf,                   PHP_FN(user_sprintf),                                   arginfo_sprintf)
    2779             :         PHP_NAMED_FE(printf,                    PHP_FN(user_printf),                                    arginfo_printf)
    2780             :         PHP_FE(vprintf,                                                                                                                 arginfo_vprintf)
    2781             :         PHP_FE(vsprintf,                                                                                                                arginfo_vsprintf)
    2782             :         PHP_FE(fprintf,                                                                                                                 arginfo_fprintf)
    2783             :         PHP_FE(vfprintf,                                                                                                                arginfo_vfprintf)
    2784             :         PHP_FE(sscanf,                                                                                                                  arginfo_sscanf)
    2785             :         PHP_FE(fscanf,                                                                                                                  arginfo_fscanf)
    2786             :         PHP_FE(parse_url,                                                                                                               arginfo_parse_url)
    2787             :         PHP_FE(urlencode,                                                                                                               arginfo_urlencode)
    2788             :         PHP_FE(urldecode,                                                                                                               arginfo_urldecode)
    2789             :         PHP_FE(rawurlencode,                                                                                                    arginfo_rawurlencode)
    2790             :         PHP_FE(rawurldecode,                                                                                                    arginfo_rawurldecode)
    2791             :         PHP_FE(http_build_query,                                                                                                arginfo_http_build_query)
    2792             : 
    2793             : #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
    2794             :         PHP_FE(readlink,                                                                                                                arginfo_readlink)
    2795             :         PHP_FE(linkinfo,                                                                                                                arginfo_linkinfo)
    2796             :         PHP_FE(symlink,                                                                                                                 arginfo_symlink)
    2797             :         PHP_FE(link,                                                                                                                    arginfo_link)
    2798             : #endif
    2799             : 
    2800             :         PHP_FE(unlink,                                                                                                                  arginfo_unlink)
    2801             :         PHP_FE(exec,                                                                                                                    arginfo_exec)
    2802             :         PHP_FE(system,                                                                                                                  arginfo_system)
    2803             :         PHP_FE(escapeshellcmd,                                                                                                  arginfo_escapeshellcmd)
    2804             :         PHP_FE(escapeshellarg,                                                                                                  arginfo_escapeshellarg)
    2805             :         PHP_FE(passthru,                                                                                                                arginfo_passthru)
    2806             :         PHP_FE(shell_exec,                                                                                                              arginfo_shell_exec)
    2807             : #ifdef PHP_CAN_SUPPORT_PROC_OPEN
    2808             :         PHP_FE(proc_open,                                                                                                               arginfo_proc_open)
    2809             :         PHP_FE(proc_close,                                                                                                              arginfo_proc_close)
    2810             :         PHP_FE(proc_terminate,                                                                                                  arginfo_proc_terminate)
    2811             :         PHP_FE(proc_get_status,                                                                                                 arginfo_proc_get_status)
    2812             : #endif
    2813             : 
    2814             : #ifdef HAVE_NICE
    2815             :         PHP_FE(proc_nice,                                                                                                               arginfo_proc_nice)
    2816             : #endif
    2817             : 
    2818             :         PHP_FE(rand,                                                                                                                    arginfo_rand)
    2819             :         PHP_FE(srand,                                                                                                                   arginfo_srand)
    2820             :         PHP_FE(getrandmax,                                                                                                      arginfo_getrandmax)
    2821             :         PHP_FE(mt_rand,                                                                                                         arginfo_mt_rand)
    2822             :         PHP_FE(mt_srand,                                                                                                                arginfo_mt_srand)
    2823             :         PHP_FE(mt_getrandmax,                                                                                                   arginfo_mt_getrandmax)
    2824             : 
    2825             : #if HAVE_GETSERVBYNAME
    2826             :         PHP_FE(getservbyname,                                                                                                   arginfo_getservbyname)
    2827             : #endif
    2828             : 
    2829             : #if HAVE_GETSERVBYPORT
    2830             :         PHP_FE(getservbyport,                                                                                                   arginfo_getservbyport)
    2831             : #endif
    2832             : 
    2833             : #if HAVE_GETPROTOBYNAME
    2834             :         PHP_FE(getprotobyname,                                                                                                  arginfo_getprotobyname)
    2835             : #endif
    2836             : 
    2837             : #if HAVE_GETPROTOBYNUMBER
    2838             :         PHP_FE(getprotobynumber,                                                                                                arginfo_getprotobynumber)
    2839             : #endif
    2840             : 
    2841             :         PHP_FE(getmyuid,                                                                                                                arginfo_getmyuid)
    2842             :         PHP_FE(getmygid,                                                                                                                arginfo_getmygid)
    2843             :         PHP_FE(getmypid,                                                                                                                arginfo_getmypid)
    2844             :         PHP_FE(getmyinode,                                                                                                              arginfo_getmyinode)
    2845             :         PHP_FE(getlastmod,                                                                                                              arginfo_getlastmod)
    2846             : 
    2847             :         PHP_FE(base64_decode,                                                                                                   arginfo_base64_decode)
    2848             :         PHP_FE(base64_encode,                                                                                                   arginfo_base64_encode)
    2849             : 
    2850             :         PHP_FE(password_hash,                                                                                                   arginfo_password_hash)
    2851             :         PHP_FE(password_get_info,                                                                                               arginfo_password_get_info)
    2852             :         PHP_FE(password_needs_rehash,                                                                                   arginfo_password_needs_rehash)
    2853             :         PHP_FE(password_verify,                                                                                                 arginfo_password_verify)
    2854             :         PHP_FE(convert_uuencode,                                                                                                arginfo_convert_uuencode)
    2855             :         PHP_FE(convert_uudecode,                                                                                                arginfo_convert_uudecode)
    2856             : 
    2857             :         PHP_FE(abs,                                                                                                                             arginfo_abs)
    2858             :         PHP_FE(ceil,                                                                                                                    arginfo_ceil)
    2859             :         PHP_FE(floor,                                                                                                                   arginfo_floor)
    2860             :         PHP_FE(round,                                                                                                                   arginfo_round)
    2861             :         PHP_FE(sin,                                                                                                                             arginfo_sin)
    2862             :         PHP_FE(cos,                                                                                                                             arginfo_cos)
    2863             :         PHP_FE(tan,                                                                                                                             arginfo_tan)
    2864             :         PHP_FE(asin,                                                                                                                    arginfo_asin)
    2865             :         PHP_FE(acos,                                                                                                                    arginfo_acos)
    2866             :         PHP_FE(atan,                                                                                                                    arginfo_atan)
    2867             :         PHP_FE(atanh,                                                                                                                   arginfo_atanh)
    2868             :         PHP_FE(atan2,                                                                                                                   arginfo_atan2)
    2869             :         PHP_FE(sinh,                                                                                                                    arginfo_sinh)
    2870             :         PHP_FE(cosh,                                                                                                                    arginfo_cosh)
    2871             :         PHP_FE(tanh,                                                                                                                    arginfo_tanh)
    2872             :         PHP_FE(asinh,                                                                                                                   arginfo_asinh)
    2873             :         PHP_FE(acosh,                                                                                                                   arginfo_acosh)
    2874             :         PHP_FE(expm1,                                                                                                                   arginfo_expm1)
    2875             :         PHP_FE(log1p,                                                                                                                   arginfo_log1p)
    2876             :         PHP_FE(pi,                                                                                                                              arginfo_pi)
    2877             :         PHP_FE(is_finite,                                                                                                               arginfo_is_finite)
    2878             :         PHP_FE(is_nan,                                                                                                                  arginfo_is_nan)
    2879             :         PHP_FE(is_infinite,                                                                                                             arginfo_is_infinite)
    2880             :         PHP_FE(pow,                                                                                                                             arginfo_pow)
    2881             :         PHP_FE(exp,                                                                                                                             arginfo_exp)
    2882             :         PHP_FE(log,                                                                                                                             arginfo_log)
    2883             :         PHP_FE(log10,                                                                                                                   arginfo_log10)
    2884             :         PHP_FE(sqrt,                                                                                                                    arginfo_sqrt)
    2885             :         PHP_FE(hypot,                                                                                                                   arginfo_hypot)
    2886             :         PHP_FE(deg2rad,                                                                                                                 arginfo_deg2rad)
    2887             :         PHP_FE(rad2deg,                                                                                                                 arginfo_rad2deg)
    2888             :         PHP_FE(bindec,                                                                                                                  arginfo_bindec)
    2889             :         PHP_FE(hexdec,                                                                                                                  arginfo_hexdec)
    2890             :         PHP_FE(octdec,                                                                                                                  arginfo_octdec)
    2891             :         PHP_FE(decbin,                                                                                                                  arginfo_decbin)
    2892             :         PHP_FE(decoct,                                                                                                                  arginfo_decoct)
    2893             :         PHP_FE(dechex,                                                                                                                  arginfo_dechex)
    2894             :         PHP_FE(base_convert,                                                                                                    arginfo_base_convert)
    2895             :         PHP_FE(number_format,                                                                                                   arginfo_number_format)
    2896             :         PHP_FE(fmod,                                                                                                                    arginfo_fmod)
    2897             : #ifdef HAVE_INET_NTOP
    2898             :         PHP_RAW_NAMED_FE(inet_ntop,             php_inet_ntop,                                                          arginfo_inet_ntop)
    2899             : #endif
    2900             : #ifdef HAVE_INET_PTON
    2901             :         PHP_RAW_NAMED_FE(inet_pton,             php_inet_pton,                                                          arginfo_inet_pton)
    2902             : #endif
    2903             :         PHP_FE(ip2long,                                                                                                                 arginfo_ip2long)
    2904             :         PHP_FE(long2ip,                                                                                                                 arginfo_long2ip)
    2905             : 
    2906             :         PHP_FE(getenv,                                                                                                                  arginfo_getenv)
    2907             : #ifdef HAVE_PUTENV
    2908             :         PHP_FE(putenv,                                                                                                                  arginfo_putenv)
    2909             : #endif
    2910             : 
    2911             :         PHP_FE(getopt,                                                                                                                  arginfo_getopt)
    2912             : 
    2913             : #ifdef HAVE_GETLOADAVG
    2914             :         PHP_FE(sys_getloadavg,                                                                                                  arginfo_sys_getloadavg)
    2915             : #endif
    2916             : #ifdef HAVE_GETTIMEOFDAY
    2917             :         PHP_FE(microtime,                                                                                                               arginfo_microtime)
    2918             :         PHP_FE(gettimeofday,                                                                                                    arginfo_gettimeofday)
    2919             : #endif
    2920             : 
    2921             : #ifdef HAVE_GETRUSAGE
    2922             :         PHP_FE(getrusage,                                                                                                               arginfo_getrusage)
    2923             : #endif
    2924             : 
    2925             : #ifdef HAVE_GETTIMEOFDAY
    2926             :         PHP_FE(uniqid,                                                                                                                  arginfo_uniqid)
    2927             : #endif
    2928             : 
    2929             :         PHP_FE(quoted_printable_decode,                                                                                 arginfo_quoted_printable_decode)
    2930             :         PHP_FE(quoted_printable_encode,                                                                                 arginfo_quoted_printable_encode)
    2931             :         PHP_FE(convert_cyr_string,                                                                                              arginfo_convert_cyr_string)
    2932             :         PHP_FE(get_current_user,                                                                                                arginfo_get_current_user)
    2933             :         PHP_FE(set_time_limit,                                                                                                  arginfo_set_time_limit)
    2934             :         PHP_FE(header_register_callback,                                                                                arginfo_header_register_callback)
    2935             :         PHP_FE(get_cfg_var,                                                                                                             arginfo_get_cfg_var)
    2936             : 
    2937             :         PHP_DEP_FALIAS(magic_quotes_runtime,    set_magic_quotes_runtime,               arginfo_set_magic_quotes_runtime)
    2938             :         PHP_DEP_FE(set_magic_quotes_runtime,                                                                    arginfo_set_magic_quotes_runtime)
    2939             :         PHP_FE(get_magic_quotes_gpc,                                                                            arginfo_get_magic_quotes_gpc)
    2940             :         PHP_FE(get_magic_quotes_runtime,                                                                        arginfo_get_magic_quotes_runtime)
    2941             : 
    2942             :         PHP_FE(error_log,                                                                                                               arginfo_error_log)
    2943             :         PHP_FE(error_get_last,                                                                                                  arginfo_error_get_last)
    2944             :         PHP_FE(call_user_func,                                                                                                  arginfo_call_user_func)
    2945             :         PHP_FE(call_user_func_array,                                                                                    arginfo_call_user_func_array)
    2946             :         PHP_FE(forward_static_call,                                                                                     arginfo_forward_static_call)
    2947             :         PHP_FE(forward_static_call_array,                                                                               arginfo_forward_static_call_array)
    2948             :         PHP_FE(serialize,                                                                                                               arginfo_serialize)
    2949             :         PHP_FE(unserialize,                                                                                                             arginfo_unserialize)
    2950             : 
    2951             :         PHP_FE(var_dump,                                                                                                                arginfo_var_dump)
    2952             :         PHP_FE(var_export,                                                                                                              arginfo_var_export)
    2953             :         PHP_FE(debug_zval_dump,                                                                                                 arginfo_debug_zval_dump)
    2954             :         PHP_FE(print_r,                                                                                                                 arginfo_print_r)
    2955             :         PHP_FE(memory_get_usage,                                                                                                arginfo_memory_get_usage)
    2956             :         PHP_FE(memory_get_peak_usage,                                                                                   arginfo_memory_get_peak_usage)
    2957             : 
    2958             :         PHP_FE(register_shutdown_function,                                                                              arginfo_register_shutdown_function)
    2959             :         PHP_FE(register_tick_function,                                                                                  arginfo_register_tick_function)
    2960             :         PHP_FE(unregister_tick_function,                                                                                arginfo_unregister_tick_function)
    2961             : 
    2962             :         PHP_FE(highlight_file,                                                                                                  arginfo_highlight_file)
    2963             :         PHP_FALIAS(show_source,                 highlight_file,                                                 arginfo_highlight_file)
    2964             :         PHP_FE(highlight_string,                                                                                                arginfo_highlight_string)
    2965             :         PHP_FE(php_strip_whitespace,                                                                                    arginfo_php_strip_whitespace)
    2966             : 
    2967             :         PHP_FE(ini_get,                                                                                                                 arginfo_ini_get)
    2968             :         PHP_FE(ini_get_all,                                                                                                             arginfo_ini_get_all)
    2969             :         PHP_FE(ini_set,                                                                                                                 arginfo_ini_set)
    2970             :         PHP_FALIAS(ini_alter,                   ini_set,                                                                arginfo_ini_set)
    2971             :         PHP_FE(ini_restore,                                                                                                             arginfo_ini_restore)
    2972             :         PHP_FE(get_include_path,                                                                                                arginfo_get_include_path)
    2973             :         PHP_FE(set_include_path,                                                                                                arginfo_set_include_path)
    2974             :         PHP_FE(restore_include_path,                                                                                    arginfo_restore_include_path)
    2975             : 
    2976             :         PHP_FE(setcookie,                                                                                                               arginfo_setcookie)
    2977             :         PHP_FE(setrawcookie,                                                                                                    arginfo_setrawcookie)
    2978             :         PHP_FE(header,                                                                                                                  arginfo_header)
    2979             :         PHP_FE(header_remove,                                                                                                   arginfo_header_remove)
    2980             :         PHP_FE(headers_sent,                                                                                                    arginfo_headers_sent)
    2981             :         PHP_FE(headers_list,                                                                                                    arginfo_headers_list)
    2982             :         PHP_FE(http_response_code,                                                                                              arginfo_http_response_code)
    2983             : 
    2984             :         PHP_FE(connection_aborted,                                                                                              arginfo_connection_aborted)
    2985             :         PHP_FE(connection_status,                                                                                               arginfo_connection_status)
    2986             :         PHP_FE(ignore_user_abort,                                                                                               arginfo_ignore_user_abort)
    2987             :         PHP_FE(parse_ini_file,                                                                                                  arginfo_parse_ini_file)
    2988             :         PHP_FE(parse_ini_string,                                                                                                arginfo_parse_ini_string)
    2989             : #if ZEND_DEBUG
    2990             :         PHP_FE(config_get_hash,                                                                                                 arginfo_config_get_hash)
    2991             : #endif
    2992             :         PHP_FE(is_uploaded_file,                                                                                                arginfo_is_uploaded_file)
    2993             :         PHP_FE(move_uploaded_file,                                                                                              arginfo_move_uploaded_file)
    2994             : 
    2995             :         /* functions from dns.c */
    2996             :         PHP_FE(gethostbyaddr,                                                                                                   arginfo_gethostbyaddr)
    2997             :         PHP_FE(gethostbyname,                                                                                                   arginfo_gethostbyname)
    2998             :         PHP_FE(gethostbynamel,                                                                                                  arginfo_gethostbynamel)
    2999             : 
    3000             : #ifdef HAVE_GETHOSTNAME
    3001             :         PHP_FE(gethostname,                                                                                                     arginfo_gethostname)
    3002             : #endif
    3003             : 
    3004             : #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
    3005             : 
    3006             :         PHP_FE(dns_check_record,                                                                                                arginfo_dns_check_record)
    3007             :         PHP_FALIAS(checkdnsrr,                  dns_check_record,                                               arginfo_dns_check_record)
    3008             : 
    3009             : # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
    3010             :         PHP_FE(dns_get_mx,                                                                                                              arginfo_dns_get_mx)
    3011             :         PHP_FALIAS(getmxrr,                             dns_get_mx,                                     arginfo_dns_get_mx)
    3012             :         PHP_FE(dns_get_record,                                                                                                  arginfo_dns_get_record)
    3013             : # endif
    3014             : #endif
    3015             : 
    3016             :         /* functions from type.c */
    3017             :         PHP_FE(intval,                                                                                                                  arginfo_intval)
    3018             :         PHP_FE(floatval,                                                                                                                arginfo_floatval)
    3019             :         PHP_FALIAS(doubleval,                   floatval,                                                               arginfo_floatval)
    3020             :         PHP_FE(strval,                                                                                                                  arginfo_strval)
    3021             :         PHP_FE(boolval,                                                                                                                 arginfo_boolval)
    3022             :         PHP_FE(gettype,                                                                                                                 arginfo_gettype)
    3023             :         PHP_FE(settype,                                                                                                                 arginfo_settype)
    3024             :         PHP_FE(is_null,                                                                                                                 arginfo_is_null)
    3025             :         PHP_FE(is_resource,                                                                                                             arginfo_is_resource)
    3026             :         PHP_FE(is_bool,                                                                                                                 arginfo_is_bool)
    3027             :         PHP_FE(is_long,                                                                                                                 arginfo_is_long)
    3028             :         PHP_FE(is_float,                                                                                                                arginfo_is_float)
    3029             :         PHP_FALIAS(is_int,                              is_long,                                                                arginfo_is_long)
    3030             :         PHP_FALIAS(is_integer,                  is_long,                                                                arginfo_is_long)
    3031             :         PHP_FALIAS(is_double,                   is_float,                                                               arginfo_is_float)
    3032             :         PHP_FALIAS(is_real,                             is_float,                                                               arginfo_is_float)
    3033             :         PHP_FE(is_numeric,                                                                                                              arginfo_is_numeric)
    3034             :         PHP_FE(is_string,                                                                                                               arginfo_is_string)
    3035             :         PHP_FE(is_array,                                                                                                                arginfo_is_array)
    3036             :         PHP_FE(is_object,                                                                                                               arginfo_is_object)
    3037             :         PHP_FE(is_scalar,                                                                                                               arginfo_is_scalar)
    3038             :         PHP_FE(is_callable,                                                                                                             arginfo_is_callable)
    3039             : 
    3040             :         /* functions from file.c */
    3041             :         PHP_FE(pclose,                                                                                                                  arginfo_pclose)
    3042             :         PHP_FE(popen,                                                                                                                   arginfo_popen)
    3043             :         PHP_FE(readfile,                                                                                                                arginfo_readfile)
    3044             :         PHP_FE(rewind,                                                                                                                  arginfo_rewind)
    3045             :         PHP_FE(rmdir,                                                                                                                   arginfo_rmdir)
    3046             :         PHP_FE(umask,                                                                                                                   arginfo_umask)
    3047             :         PHP_FE(fclose,                                                                                                                  arginfo_fclose)
    3048             :         PHP_FE(feof,                                                                                                                    arginfo_feof)
    3049             :         PHP_FE(fgetc,                                                                                                                   arginfo_fgetc)
    3050             :         PHP_FE(fgets,                                                                                                                   arginfo_fgets)
    3051             :         PHP_FE(fgetss,                                                                                                                  arginfo_fgetss)
    3052             :         PHP_FE(fread,                                                                                                                   arginfo_fread)
    3053             :         PHP_NAMED_FE(fopen,                             php_if_fopen,                                                   arginfo_fopen)
    3054             :         PHP_FE(fpassthru,                                                                                                               arginfo_fpassthru)
    3055             :         PHP_NAMED_FE(ftruncate,                 php_if_ftruncate,                                               arginfo_ftruncate)
    3056             :         PHP_NAMED_FE(fstat,                             php_if_fstat,                                                   arginfo_fstat)
    3057             :         PHP_FE(fseek,                                                                                                                   arginfo_fseek)
    3058             :         PHP_FE(ftell,                                                                                                                   arginfo_ftell)
    3059             :         PHP_FE(fflush,                                                                                                                  arginfo_fflush)
    3060             :         PHP_FE(fwrite,                                                                                                                  arginfo_fwrite)
    3061             :         PHP_FALIAS(fputs,                               fwrite,                                                                 arginfo_fwrite)
    3062             :         PHP_FE(mkdir,                                                                                                                   arginfo_mkdir)
    3063             :         PHP_FE(rename,                                                                                                                  arginfo_rename)
    3064             :         PHP_FE(copy,                                                                                                                    arginfo_copy)
    3065             :         PHP_FE(tempnam,                                                                                                                 arginfo_tempnam)
    3066             :         PHP_NAMED_FE(tmpfile,                   php_if_tmpfile,                                                 arginfo_tmpfile)
    3067             :         PHP_FE(file,                                                                                                                    arginfo_file)
    3068             :         PHP_FE(file_get_contents,                                                                                               arginfo_file_get_contents)
    3069             :         PHP_FE(file_put_contents,                                                                                               arginfo_file_put_contents)
    3070             :         PHP_FE(stream_select,                                                                                                   arginfo_stream_select)
    3071             :         PHP_FE(stream_context_create,                                                                                   arginfo_stream_context_create)
    3072             :         PHP_FE(stream_context_set_params,                                                                               arginfo_stream_context_set_params)
    3073             :         PHP_FE(stream_context_get_params,                                                                               arginfo_stream_context_get_params)
    3074             :         PHP_FE(stream_context_set_option,                                                                               arginfo_stream_context_set_option)
    3075             :         PHP_FE(stream_context_get_options,                                                                              arginfo_stream_context_get_options)
    3076             :         PHP_FE(stream_context_get_default,                                                                              arginfo_stream_context_get_default)
    3077             :         PHP_FE(stream_context_set_default,                                                                              arginfo_stream_context_set_default)
    3078             :         PHP_FE(stream_filter_prepend,                                                                                   arginfo_stream_filter_prepend)
    3079             :         PHP_FE(stream_filter_append,                                                                                    arginfo_stream_filter_append)
    3080             :         PHP_FE(stream_filter_remove,                                                                                    arginfo_stream_filter_remove)
    3081             :         PHP_FE(stream_socket_client,                                                                                    arginfo_stream_socket_client)
    3082             :         PHP_FE(stream_socket_server,                                                                                    arginfo_stream_socket_server)
    3083             :         PHP_FE(stream_socket_accept,                                                                                    arginfo_stream_socket_accept)
    3084             :         PHP_FE(stream_socket_get_name,                                                                                  arginfo_stream_socket_get_name)
    3085             :         PHP_FE(stream_socket_recvfrom,                                                                                  arginfo_stream_socket_recvfrom)
    3086             :         PHP_FE(stream_socket_sendto,                                                                                    arginfo_stream_socket_sendto)
    3087             :         PHP_FE(stream_socket_enable_crypto,                                                                             arginfo_stream_socket_enable_crypto)
    3088             : #ifdef HAVE_SHUTDOWN
    3089             :         PHP_FE(stream_socket_shutdown,                                                                                  arginfo_stream_socket_shutdown)
    3090             : #endif
    3091             : #if HAVE_SOCKETPAIR
    3092             :         PHP_FE(stream_socket_pair,                                                                                              arginfo_stream_socket_pair)
    3093             : #endif
    3094             :         PHP_FE(stream_copy_to_stream,                                                                                   arginfo_stream_copy_to_stream)
    3095             :         PHP_FE(stream_get_contents,                                                                                             arginfo_stream_get_contents)
    3096             :         PHP_FE(stream_supports_lock,                                                                                    arginfo_stream_supports_lock)
    3097             :         PHP_FE(fgetcsv,                                                                                                                 arginfo_fgetcsv)
    3098             :         PHP_FE(fputcsv,                                                                                                                 arginfo_fputcsv)
    3099             :         PHP_FE(flock,                                                                                                                   arginfo_flock)
    3100             :         PHP_FE(get_meta_tags,                                                                                                   arginfo_get_meta_tags)
    3101             :         PHP_FE(stream_set_read_buffer,                                                                                  arginfo_stream_set_read_buffer)
    3102             :         PHP_FE(stream_set_write_buffer,                                                                                 arginfo_stream_set_write_buffer)
    3103             :         PHP_FALIAS(set_file_buffer, stream_set_write_buffer,                                    arginfo_stream_set_write_buffer)
    3104             :         PHP_FE(stream_set_chunk_size,                                                                                   arginfo_stream_set_chunk_size)
    3105             : 
    3106             :         PHP_DEP_FALIAS(set_socket_blocking, stream_set_blocking,                                arginfo_stream_set_blocking)
    3107             :         PHP_FE(stream_set_blocking,                                                                                             arginfo_stream_set_blocking)
    3108             :         PHP_FALIAS(socket_set_blocking, stream_set_blocking,                                    arginfo_stream_set_blocking)
    3109             : 
    3110             :         PHP_FE(stream_get_meta_data,                                                                                    arginfo_stream_get_meta_data)
    3111             :         PHP_FE(stream_get_line,                                                                                                 arginfo_stream_get_line)
    3112             :         PHP_FE(stream_wrapper_register,                                                                                 arginfo_stream_wrapper_register)
    3113             :         PHP_FALIAS(stream_register_wrapper, stream_wrapper_register,                    arginfo_stream_wrapper_register)
    3114             :         PHP_FE(stream_wrapper_unregister,                                                                               arginfo_stream_wrapper_unregister)
    3115             :         PHP_FE(stream_wrapper_restore,                                                                                  arginfo_stream_wrapper_restore)
    3116             :         PHP_FE(stream_get_wrappers,                                                                                             arginfo_stream_get_wrappers)
    3117             :         PHP_FE(stream_get_transports,                                                                                   arginfo_stream_get_transports)
    3118             :         PHP_FE(stream_resolve_include_path,                                                                             arginfo_stream_resolve_include_path)
    3119             :         PHP_FE(stream_is_local,                                                                                         arginfo_stream_is_local)
    3120             :         PHP_FE(get_headers,                                                                                                             arginfo_get_headers)
    3121             : 
    3122             : #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
    3123             :         PHP_FE(stream_set_timeout,                                                                                              arginfo_stream_set_timeout)
    3124             :         PHP_FALIAS(socket_set_timeout, stream_set_timeout,                                              arginfo_stream_set_timeout)
    3125             : #endif
    3126             : 
    3127             :         PHP_FALIAS(socket_get_status, stream_get_meta_data,                                             arginfo_stream_get_meta_data)
    3128             : 
    3129             : #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
    3130             :         PHP_FE(realpath,                                                                                                                arginfo_realpath)
    3131             : #endif
    3132             : 
    3133             : #ifdef HAVE_FNMATCH
    3134             :         PHP_FE(fnmatch,                                                                                                                 arginfo_fnmatch)
    3135             : #endif
    3136             : 
    3137             :         /* functions from fsock.c */
    3138             :         PHP_FE(fsockopen,                                                                                                               arginfo_fsockopen)
    3139             :         PHP_FE(pfsockopen,                                                                                                              arginfo_pfsockopen)
    3140             : 
    3141             :         /* functions from pack.c */
    3142             :         PHP_FE(pack,                                                                                                                    arginfo_pack)
    3143             :         PHP_FE(unpack,                                                                                                                  arginfo_unpack)
    3144             : 
    3145             :         /* functions from browscap.c */
    3146             :         PHP_FE(get_browser,                                                                                                             arginfo_get_browser)
    3147             : 
    3148             : #if HAVE_CRYPT
    3149             :         /* functions from crypt.c */
    3150             :         PHP_FE(crypt,                                                                                                                   arginfo_crypt)
    3151             : #endif
    3152             : 
    3153             :         /* functions from dir.c */
    3154             :         PHP_FE(opendir,                                                                                                                 arginfo_opendir)
    3155             :         PHP_FE(closedir,                                                                                                                arginfo_closedir)
    3156             :         PHP_FE(chdir,                                                                                                                   arginfo_chdir)
    3157             : 
    3158             : #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
    3159             :         PHP_FE(chroot,                                                                                                                  arginfo_chroot)
    3160             : #endif
    3161             : 
    3162             :         PHP_FE(getcwd,                                                                                                                  arginfo_getcwd)
    3163             :         PHP_FE(rewinddir,                                                                                                               arginfo_rewinddir)
    3164             :         PHP_NAMED_FE(readdir,                   php_if_readdir,                                                 arginfo_readdir)
    3165             :         PHP_FALIAS(dir,                                 getdir,                                                                 arginfo_dir)
    3166             :         PHP_FE(scandir,                                                                                                                 arginfo_scandir)
    3167             : #ifdef HAVE_GLOB
    3168             :         PHP_FE(glob,                                                                                                                    arginfo_glob)
    3169             : #endif
    3170             :         /* functions from filestat.c */
    3171             :         PHP_FE(fileatime,                                                                                                               arginfo_fileatime)
    3172             :         PHP_FE(filectime,                                                                                                               arginfo_filectime)
    3173             :         PHP_FE(filegroup,                                                                                                               arginfo_filegroup)
    3174             :         PHP_FE(fileinode,                                                                                                               arginfo_fileinode)
    3175             :         PHP_FE(filemtime,                                                                                                               arginfo_filemtime)
    3176             :         PHP_FE(fileowner,                                                                                                               arginfo_fileowner)
    3177             :         PHP_FE(fileperms,                                                                                                               arginfo_fileperms)
    3178             :         PHP_FE(filesize,                                                                                                                arginfo_filesize)
    3179             :         PHP_FE(filetype,                                                                                                                arginfo_filetype)
    3180             :         PHP_FE(file_exists,                                                                                                             arginfo_file_exists)
    3181             :         PHP_FE(is_writable,                                                                                                             arginfo_is_writable)
    3182             :         PHP_FALIAS(is_writeable,                is_writable,                                                    arginfo_is_writable)
    3183             :         PHP_FE(is_readable,                                                                                                             arginfo_is_readable)
    3184             :         PHP_FE(is_executable,                                                                                                   arginfo_is_executable)
    3185             :         PHP_FE(is_file,                                                                                                                 arginfo_is_file)
    3186             :         PHP_FE(is_dir,                                                                                                                  arginfo_is_dir)
    3187             :         PHP_FE(is_link,                                                                                                                 arginfo_is_link)
    3188             :         PHP_NAMED_FE(stat,                              php_if_stat,                                                    arginfo_stat)
    3189             :         PHP_NAMED_FE(lstat,                             php_if_lstat,                                                   arginfo_lstat)
    3190             : #ifndef NETWARE
    3191             :         PHP_FE(chown,                                                                                                                   arginfo_chown)
    3192             :         PHP_FE(chgrp,                                                                                                                   arginfo_chgrp)
    3193             : #endif
    3194             : #if HAVE_LCHOWN
    3195             :         PHP_FE(lchown,                                                                                                                  arginfo_lchown)
    3196             : #endif
    3197             : #if HAVE_LCHOWN
    3198             :         PHP_FE(lchgrp,                                                                                                                  arginfo_lchgrp)
    3199             : #endif
    3200             :         PHP_FE(chmod,                                                                                                                   arginfo_chmod)
    3201             : #if HAVE_UTIME
    3202             :         PHP_FE(touch,                                                                                                                   arginfo_touch)
    3203             : #endif
    3204             :         PHP_FE(clearstatcache,                                                                                                  arginfo_clearstatcache)
    3205             :         PHP_FE(disk_total_space,                                                                                                arginfo_disk_total_space)
    3206             :         PHP_FE(disk_free_space,                                                                                                 arginfo_disk_free_space)
    3207             :         PHP_FALIAS(diskfreespace,               disk_free_space,                                                arginfo_disk_free_space)
    3208             :         PHP_FE(realpath_cache_size,                                                                                             arginfo_realpath_cache_size)
    3209             :         PHP_FE(realpath_cache_get,                                                                                              arginfo_realpath_cache_get)
    3210             : 
    3211             :         /* functions from mail.c */
    3212             :         PHP_FE(mail,                                                                                                                    arginfo_mail)
    3213             :         PHP_FE(ezmlm_hash,                                                                                                              arginfo_ezmlm_hash)
    3214             : 
    3215             :         /* functions from syslog.c */
    3216             : #ifdef HAVE_SYSLOG_H
    3217             :         PHP_FE(openlog,                                                                                                                 arginfo_openlog)
    3218             :         PHP_FE(syslog,                                                                                                                  arginfo_syslog)
    3219             :         PHP_FE(closelog,                                                                                                                arginfo_closelog)
    3220             : #endif
    3221             : 
    3222             :         /* functions from lcg.c */
    3223             :         PHP_FE(lcg_value,                                                                                                               arginfo_lcg_value)
    3224             : 
    3225             :         /* functions from metaphone.c */
    3226             :         PHP_FE(metaphone,                                                                                                               arginfo_metaphone)
    3227             : 
    3228             :         /* functions from output.c */
    3229             :         PHP_FE(ob_start,                                                                                                                arginfo_ob_start)
    3230             :         PHP_FE(ob_flush,                                                                                                                arginfo_ob_flush)
    3231             :         PHP_FE(ob_clean,                                                                                                                arginfo_ob_clean)
    3232             :         PHP_FE(ob_end_flush,                                                                                                    arginfo_ob_end_flush)
    3233             :         PHP_FE(ob_end_clean,                                                                                                    arginfo_ob_end_clean)
    3234             :         PHP_FE(ob_get_flush,                                                                                                    arginfo_ob_get_flush)
    3235             :         PHP_FE(ob_get_clean,                                                                                                    arginfo_ob_get_clean)
    3236             :         PHP_FE(ob_get_length,                                                                                                   arginfo_ob_get_length)
    3237             :         PHP_FE(ob_get_level,                                                                                                    arginfo_ob_get_level)
    3238             :         PHP_FE(ob_get_status,                                                                                                   arginfo_ob_get_status)
    3239             :         PHP_FE(ob_get_contents,                                                                                                 arginfo_ob_get_contents)
    3240             :         PHP_FE(ob_implicit_flush,                                                                                               arginfo_ob_implicit_flush)
    3241             :         PHP_FE(ob_list_handlers,                                                                                                arginfo_ob_list_handlers)
    3242             : 
    3243             :         /* functions from array.c */
    3244             :         PHP_FE(ksort,                                                                                                                   arginfo_ksort)
    3245             :         PHP_FE(krsort,                                                                                                                  arginfo_krsort)
    3246             :         PHP_FE(natsort,                                                                                                                 arginfo_natsort)
    3247             :         PHP_FE(natcasesort,                                                                                                             arginfo_natcasesort)
    3248             :         PHP_FE(asort,                                                                                                                   arginfo_asort)
    3249             :         PHP_FE(arsort,                                                                                                                  arginfo_arsort)
    3250             :         PHP_FE(sort,                                                                                                                    arginfo_sort)
    3251             :         PHP_FE(rsort,                                                                                                                   arginfo_rsort)
    3252             :         PHP_FE(usort,                                                                                                                   arginfo_usort)
    3253             :         PHP_FE(uasort,                                                                                                                  arginfo_uasort)
    3254             :         PHP_FE(uksort,                                                                                                                  arginfo_uksort)
    3255             :         PHP_FE(shuffle,                                                                                                                 arginfo_shuffle)
    3256             :         PHP_FE(array_walk,                                                                                                              arginfo_array_walk)
    3257             :         PHP_FE(array_walk_recursive,                                                                                    arginfo_array_walk_recursive)
    3258             :         PHP_FE(count,                                                                                                                   arginfo_count)
    3259             :         PHP_FE(end,                                                                                                                             arginfo_end)
    3260             :         PHP_FE(prev,                                                                                                                    arginfo_prev)
    3261             :         PHP_FE(next,                                                                                                                    arginfo_next)
    3262             :         PHP_FE(reset,                                                                                                                   arginfo_reset)
    3263             :         PHP_FE(current,                                                                                                                 arginfo_current)
    3264             :         PHP_FE(key,                                                                                                                             arginfo_key)
    3265             :         PHP_FE(min,                                                                                                                             arginfo_min)
    3266             :         PHP_FE(max,                                                                                                                             arginfo_max)
    3267             :         PHP_FE(in_array,                                                                                                                arginfo_in_array)
    3268             :         PHP_FE(array_search,                                                                                                    arginfo_array_search)
    3269             :         PHP_FE(extract,                                                                                                                 arginfo_extract)
    3270             :         PHP_FE(compact,                                                                                                                 arginfo_compact)
    3271             :         PHP_FE(array_fill,                                                                                                              arginfo_array_fill)
    3272             :         PHP_FE(array_fill_keys,                                                                                                 arginfo_array_fill_keys)
    3273             :         PHP_FE(range,                                                                                                                   arginfo_range)
    3274             :         PHP_FE(array_multisort,                                                                                                 arginfo_array_multisort)
    3275             :         PHP_FE(array_push,                                                                                                              arginfo_array_push)
    3276             :         PHP_FE(array_pop,                                                                                                               arginfo_array_pop)
    3277             :         PHP_FE(array_shift,                                                                                                             arginfo_array_shift)
    3278             :         PHP_FE(array_unshift,                                                                                                   arginfo_array_unshift)
    3279             :         PHP_FE(array_splice,                                                                                                    arginfo_array_splice)
    3280             :         PHP_FE(array_slice,                                                                                                             arginfo_array_slice)
    3281             :         PHP_FE(array_merge,                                                                                                             arginfo_array_merge)
    3282             :         PHP_FE(array_merge_recursive,                                                                                   arginfo_array_merge_recursive)
    3283             :         PHP_FE(array_replace,                                                                                                   arginfo_array_replace)
    3284             :         PHP_FE(array_replace_recursive,                                                                                 arginfo_array_replace_recursive)
    3285             :         PHP_FE(array_keys,                                                                                                              arginfo_array_keys)
    3286             :         PHP_FE(array_values,                                                                                                    arginfo_array_values)
    3287             :         PHP_FE(array_count_values,                                                                                              arginfo_array_count_values)
    3288             :         PHP_FE(array_column,                                                                                                    arginfo_array_column)
    3289             :         PHP_FE(array_reverse,                                                                                                   arginfo_array_reverse)
    3290             :         PHP_FE(array_reduce,                                                                                                    arginfo_array_reduce)
    3291             :         PHP_FE(array_pad,                                                                                                               arginfo_array_pad)
    3292             :         PHP_FE(array_flip,                                                                                                              arginfo_array_flip)
    3293             :         PHP_FE(array_change_key_case,                                                                                   arginfo_array_change_key_case)
    3294             :         PHP_FE(array_rand,                                                                                                              arginfo_array_rand)
    3295             :         PHP_FE(array_unique,                                                                                                    arginfo_array_unique)
    3296             :         PHP_FE(array_intersect,                                                                                                 arginfo_array_intersect)
    3297             :         PHP_FE(array_intersect_key,                                                                                             arginfo_array_intersect_key)
    3298             :         PHP_FE(array_intersect_ukey,                                                                                    arginfo_array_intersect_ukey)
    3299             :         PHP_FE(array_uintersect,                                                                                                arginfo_array_uintersect)
    3300             :         PHP_FE(array_intersect_assoc,                                                                                   arginfo_array_intersect_assoc)
    3301             :         PHP_FE(array_uintersect_assoc,                                                                                  arginfo_array_uintersect_assoc)
    3302             :         PHP_FE(array_intersect_uassoc,                                                                                  arginfo_array_intersect_uassoc)
    3303             :         PHP_FE(array_uintersect_uassoc,                                                                                 arginfo_array_uintersect_uassoc)
    3304             :         PHP_FE(array_diff,                                                                                                              arginfo_array_diff)
    3305             :         PHP_FE(array_diff_key,                                                                                                  arginfo_array_diff_key)
    3306             :         PHP_FE(array_diff_ukey,                                                                                                 arginfo_array_diff_ukey)
    3307             :         PHP_FE(array_udiff,                                                                                                             arginfo_array_udiff)
    3308             :         PHP_FE(array_diff_assoc,                                                                                                arginfo_array_diff_assoc)
    3309             :         PHP_FE(array_udiff_assoc,                                                                                               arginfo_array_udiff_assoc)
    3310             :         PHP_FE(array_diff_uassoc,                                                                                               arginfo_array_diff_uassoc)
    3311             :         PHP_FE(array_udiff_uassoc,                                                                                              arginfo_array_udiff_uassoc)
    3312             :         PHP_FE(array_sum,                                                                                                               arginfo_array_sum)
    3313             :         PHP_FE(array_product,                                                                                                   arginfo_array_product)
    3314             :         PHP_FE(array_filter,                                                                                                    arginfo_array_filter)
    3315             :         PHP_FE(array_map,                                                                                                               arginfo_array_map)
    3316             :         PHP_FE(array_chunk,                                                                                                             arginfo_array_chunk)
    3317             :         PHP_FE(array_combine,                                                                                                   arginfo_array_combine)
    3318             :         PHP_FE(array_key_exists,                                                                                                arginfo_array_key_exists)
    3319             : 
    3320             :         /* aliases from array.c */
    3321             :         PHP_FALIAS(pos,                                 current,                                                                arginfo_current)
    3322             :         PHP_FALIAS(sizeof,                              count,                                                                  arginfo_count)
    3323             :         PHP_FALIAS(key_exists,                  array_key_exists,                                               arginfo_array_key_exists)
    3324             : 
    3325             :         /* functions from assert.c */
    3326             :         PHP_FE(assert,                                                                                                                  arginfo_assert)
    3327             :         PHP_FE(assert_options,                                                                                                  arginfo_assert_options)
    3328             : 
    3329             :         /* functions from versioning.c */
    3330             :         PHP_FE(version_compare,                                                                                                 arginfo_version_compare)
    3331             : 
    3332             :         /* functions from ftok.c*/
    3333             : #if HAVE_FTOK
    3334             :         PHP_FE(ftok,                                                                                                                    arginfo_ftok)
    3335             : #endif
    3336             : 
    3337             :         PHP_FE(str_rot13,                                                                                                               arginfo_str_rot13)
    3338             :         PHP_FE(stream_get_filters,                                                                                              arginfo_stream_get_filters)
    3339             :         PHP_FE(stream_filter_register,                                                                                  arginfo_stream_filter_register)
    3340             :         PHP_FE(stream_bucket_make_writeable,                                                                    arginfo_stream_bucket_make_writeable)
    3341             :         PHP_FE(stream_bucket_prepend,                                                                                   arginfo_stream_bucket_prepend)
    3342             :         PHP_FE(stream_bucket_append,                                                                                    arginfo_stream_bucket_append)
    3343             :         PHP_FE(stream_bucket_new,                                                                                               arginfo_stream_bucket_new)
    3344             : 
    3345             :         PHP_FE(output_add_rewrite_var,                                                                                  arginfo_output_add_rewrite_var)
    3346             :         PHP_FE(output_reset_rewrite_vars,                                                                               arginfo_output_reset_rewrite_vars)
    3347             : 
    3348             :         PHP_FE(sys_get_temp_dir,                                                                                                arginfo_sys_get_temp_dir)
    3349             : 
    3350             :         PHP_FE_END
    3351             : };
    3352             : /* }}} */
    3353             : 
    3354             : static const zend_module_dep standard_deps[] = { /* {{{ */
    3355             :         ZEND_MOD_OPTIONAL("session")
    3356             :         ZEND_MOD_END
    3357             : };
    3358             : /* }}} */
    3359             : 
    3360             : zend_module_entry basic_functions_module = { /* {{{ */
    3361             :         STANDARD_MODULE_HEADER_EX,
    3362             :         NULL,
    3363             :         standard_deps,
    3364             :         "standard",                                   /* extension name */
    3365             :         basic_functions,                        /* function list */
    3366             :         PHP_MINIT(basic),                       /* process startup */
    3367             :         PHP_MSHUTDOWN(basic),           /* process shutdown */
    3368             :         PHP_RINIT(basic),                       /* request startup */
    3369             :         PHP_RSHUTDOWN(basic),           /* request shutdown */
    3370             :         PHP_MINFO(basic),                       /* extension info */
    3371             :         PHP_VERSION,                            /* extension version */
    3372             :         STANDARD_MODULE_PROPERTIES
    3373             : };
    3374             : /* }}} */
    3375             : 
    3376             : #if defined(HAVE_PUTENV)
    3377        1275 : static void php_putenv_destructor(putenv_entry *pe) /* {{{ */
    3378             : {
    3379        1275 :         if (pe->previous_value) {
    3380             : #if _MSC_VER >= 1300
    3381             :                 /* VS.Net has a bug in putenv() when setting a variable that
    3382             :                  * is already set; if the SetEnvironmentVariable() API call
    3383             :                  * fails, the Crt will double free() a string.
    3384             :                  * We try to avoid this by setting our own value first */
    3385             :                 SetEnvironmentVariable(pe->key, "bugbug");
    3386             : #endif
    3387          60 :                 putenv(pe->previous_value);
    3388             : # if defined(PHP_WIN32)
    3389             :                 efree(pe->previous_value);
    3390             : # endif
    3391             :         } else {
    3392             : # if HAVE_UNSETENV
    3393        1215 :                 unsetenv(pe->key);
    3394             : # elif defined(PHP_WIN32)
    3395             :                 SetEnvironmentVariable(pe->key, NULL);
    3396             : # else
    3397             :                 char **env;
    3398             : 
    3399             :                 for (env = environ; env != NULL && *env != NULL; env++) {
    3400             :                         if (!strncmp(*env, pe->key, pe->key_len) && (*env)[pe->key_len] == '=') {      /* found it */
    3401             :                                 *env = "";
    3402             :                                 break;
    3403             :                         }
    3404             :                 }
    3405             : # endif
    3406             :         }
    3407             : #ifdef HAVE_TZSET
    3408             :         /* don't forget to reset the various libc globals that
    3409             :          * we might have changed by an earlier call to tzset(). */
    3410        1275 :         if (!strncmp(pe->key, "TZ", pe->key_len)) {
    3411          14 :                 tzset();
    3412             :         }
    3413             : #endif
    3414             : 
    3415        1275 :         efree(pe->putenv_string);
    3416        1275 :         efree(pe->key);
    3417        1275 : }
    3418             : /* }}} */
    3419             : #endif
    3420             : 
    3421       21265 : static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */
    3422             : {
    3423       21265 :         BG(rand_is_seeded) = 0;
    3424       21265 :         BG(mt_rand_is_seeded) = 0;
    3425       21265 :         BG(umask) = -1;
    3426       21265 :         BG(next) = NULL;
    3427       21265 :         BG(left) = -1;
    3428       21265 :         BG(user_tick_functions) = NULL;
    3429       21265 :         BG(user_filter_map) = NULL;
    3430       21265 :         BG(serialize_lock) = 0;
    3431             :         
    3432       21265 :         memset(&BG(serialize), 0, sizeof(BG(serialize)));
    3433       21265 :         memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
    3434             : 
    3435       21265 :         memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex)));
    3436             : 
    3437             : #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
    3438             :         memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
    3439             : #endif
    3440             : 
    3441       21265 :         BG(incomplete_class) = incomplete_class_entry;
    3442       21265 :         BG(page_uid) = -1;
    3443       21265 :         BG(page_gid) = -1;
    3444       21265 : }
    3445             : /* }}} */
    3446             : 
    3447       21298 : static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */
    3448             : {
    3449       21298 :         if (BG(url_adapt_state_ex).tags) {
    3450       21298 :                 zend_hash_destroy(BG(url_adapt_state_ex).tags);
    3451       21298 :                 free(BG(url_adapt_state_ex).tags);
    3452             :         }
    3453       21298 : }
    3454             : /* }}} */
    3455             : 
    3456             : #define PHP_DOUBLE_INFINITY_HIGH       0x7ff00000
    3457             : #define PHP_DOUBLE_QUIET_NAN_HIGH      0xfff80000
    3458             : 
    3459       21271 : PHPAPI double php_get_nan(void) /* {{{ */
    3460             : {
    3461             : #if HAVE_HUGE_VAL_NAN
    3462       21271 :         return HUGE_VAL + -HUGE_VAL;
    3463             : #elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
    3464             :         double val = 0.0;
    3465             :         ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
    3466             :         ((php_uint32*)&val)[0] = 0;
    3467             :         return val;
    3468             : #elif HAVE_ATOF_ACCEPTS_NAN
    3469             :         return atof("NAN");
    3470             : #else
    3471             :         return 0.0/0.0;
    3472             : #endif
    3473             : }
    3474             : /* }}} */
    3475             : 
    3476       21271 : PHPAPI double php_get_inf(void) /* {{{ */
    3477             : {
    3478             : #if HAVE_HUGE_VAL_INF
    3479       21271 :         return HUGE_VAL;
    3480             : #elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
    3481             :         double val = 0.0;
    3482             :         ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
    3483             :         ((php_uint32*)&val)[0] = 0;
    3484             :         return val;
    3485             : #elif HAVE_ATOF_ACCEPTS_INF
    3486             :         return atof("INF");
    3487             : #else
    3488             :         return 1.0/0.0;
    3489             : #endif
    3490             : }
    3491             : /* }}} */
    3492             : 
    3493             : #define BASIC_MINIT_SUBMODULE(module) \
    3494             :         if (PHP_MINIT(module)(INIT_FUNC_ARGS_PASSTHRU) == SUCCESS) {\
    3495             :                 BASIC_ADD_SUBMODULE(module); \
    3496             :         }
    3497             : 
    3498             : #define BASIC_ADD_SUBMODULE(module) \
    3499             :         zend_hash_add_empty_element(&basic_submodules, #module, strlen(#module));
    3500             :         
    3501             : #define BASIC_RINIT_SUBMODULE(module) \
    3502             :         if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
    3503             :                 PHP_RINIT(module)(INIT_FUNC_ARGS_PASSTHRU); \
    3504             :         }
    3505             : 
    3506             : #define BASIC_MINFO_SUBMODULE(module) \
    3507             :         if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
    3508             :                 PHP_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); \
    3509             :         }
    3510             : 
    3511             : #define BASIC_RSHUTDOWN_SUBMODULE(module) \
    3512             :         if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
    3513             :                 PHP_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS_PASSTHRU); \
    3514             :         }
    3515             : 
    3516             : #define BASIC_MSHUTDOWN_SUBMODULE(module) \
    3517             :         if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
    3518             :                 PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS_PASSTHRU); \
    3519             :         }
    3520             : 
    3521       21265 : PHP_MINIT_FUNCTION(basic) /* {{{ */
    3522             : {
    3523             : #ifdef ZTS
    3524             :         ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
    3525             : #ifdef PHP_WIN32
    3526             :         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 );
    3527             : #endif
    3528             : #else
    3529       21265 :         basic_globals_ctor(&basic_globals TSRMLS_CC);
    3530             : #ifdef PHP_WIN32
    3531             :         php_win32_core_globals_ctor(&the_php_win32_core_globals TSRMLS_CC);
    3532             : #endif
    3533             : #endif
    3534             : 
    3535       21265 :         zend_hash_init(&basic_submodules, 0, NULL, NULL, 1);
    3536             : 
    3537       21265 :         BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(TSRMLS_C);
    3538             : 
    3539       21265 :         REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT);
    3540       21265 :         REGISTER_LONG_CONSTANT("CONNECTION_NORMAL",  PHP_CONNECTION_NORMAL,  CONST_CS | CONST_PERSISTENT);
    3541       21265 :         REGISTER_LONG_CONSTANT("CONNECTION_TIMEOUT", PHP_CONNECTION_TIMEOUT, CONST_CS | CONST_PERSISTENT);
    3542             : 
    3543       21265 :         REGISTER_LONG_CONSTANT("INI_USER",   ZEND_INI_USER,   CONST_CS | CONST_PERSISTENT);
    3544       21265 :         REGISTER_LONG_CONSTANT("INI_PERDIR", ZEND_INI_PERDIR, CONST_CS | CONST_PERSISTENT);
    3545       21265 :         REGISTER_LONG_CONSTANT("INI_SYSTEM", ZEND_INI_SYSTEM, CONST_CS | CONST_PERSISTENT);
    3546       21265 :         REGISTER_LONG_CONSTANT("INI_ALL",    ZEND_INI_ALL,    CONST_CS | CONST_PERSISTENT);
    3547             : 
    3548       21265 :         REGISTER_LONG_CONSTANT("INI_SCANNER_NORMAL", ZEND_INI_SCANNER_NORMAL, CONST_CS | CONST_PERSISTENT);
    3549       21265 :         REGISTER_LONG_CONSTANT("INI_SCANNER_RAW",    ZEND_INI_SCANNER_RAW,    CONST_CS | CONST_PERSISTENT);
    3550             : 
    3551       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_SCHEME", PHP_URL_SCHEME, CONST_CS | CONST_PERSISTENT);
    3552       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_HOST", PHP_URL_HOST, CONST_CS | CONST_PERSISTENT);
    3553       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_PORT", PHP_URL_PORT, CONST_CS | CONST_PERSISTENT);
    3554       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_USER", PHP_URL_USER, CONST_CS | CONST_PERSISTENT);
    3555       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_PASS", PHP_URL_PASS, CONST_CS | CONST_PERSISTENT);
    3556       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_PATH", PHP_URL_PATH, CONST_CS | CONST_PERSISTENT);
    3557       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_QUERY", PHP_URL_QUERY, CONST_CS | CONST_PERSISTENT);
    3558       21265 :         REGISTER_LONG_CONSTANT("PHP_URL_FRAGMENT", PHP_URL_FRAGMENT, CONST_CS | CONST_PERSISTENT);
    3559       21265 :         REGISTER_LONG_CONSTANT("PHP_QUERY_RFC1738", PHP_QUERY_RFC1738, CONST_CS | CONST_PERSISTENT);
    3560       21265 :         REGISTER_LONG_CONSTANT("PHP_QUERY_RFC3986", PHP_QUERY_RFC3986, CONST_CS | CONST_PERSISTENT);
    3561             : 
    3562             : #define REGISTER_MATH_CONSTANT(x)  REGISTER_DOUBLE_CONSTANT(#x, x, CONST_CS | CONST_PERSISTENT)
    3563       21265 :         REGISTER_MATH_CONSTANT(M_E);
    3564       21265 :         REGISTER_MATH_CONSTANT(M_LOG2E);
    3565       21265 :         REGISTER_MATH_CONSTANT(M_LOG10E);
    3566       21265 :         REGISTER_MATH_CONSTANT(M_LN2);
    3567       21265 :         REGISTER_MATH_CONSTANT(M_LN10);
    3568       21265 :         REGISTER_MATH_CONSTANT(M_PI);
    3569       21265 :         REGISTER_MATH_CONSTANT(M_PI_2);
    3570       21265 :         REGISTER_MATH_CONSTANT(M_PI_4);
    3571       21265 :         REGISTER_MATH_CONSTANT(M_1_PI);
    3572       21265 :         REGISTER_MATH_CONSTANT(M_2_PI);
    3573       21265 :         REGISTER_MATH_CONSTANT(M_SQRTPI);
    3574       21265 :         REGISTER_MATH_CONSTANT(M_2_SQRTPI);
    3575       21265 :         REGISTER_MATH_CONSTANT(M_LNPI);
    3576       21265 :         REGISTER_MATH_CONSTANT(M_EULER);
    3577       21265 :         REGISTER_MATH_CONSTANT(M_SQRT2);
    3578       21265 :         REGISTER_MATH_CONSTANT(M_SQRT1_2);
    3579       21265 :         REGISTER_MATH_CONSTANT(M_SQRT3);
    3580       21265 :         REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | CONST_PERSISTENT);
    3581       21265 :         REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | CONST_PERSISTENT);
    3582             : 
    3583       21265 :         REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS | CONST_PERSISTENT);
    3584       21265 :         REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, CONST_CS | CONST_PERSISTENT);
    3585       21265 :         REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_EVEN", PHP_ROUND_HALF_EVEN, CONST_CS | CONST_PERSISTENT);
    3586       21265 :         REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_ODD", PHP_ROUND_HALF_ODD, CONST_CS | CONST_PERSISTENT);
    3587             : 
    3588             : #if ENABLE_TEST_CLASS
    3589             :         test_class_startup();
    3590             : #endif
    3591             : 
    3592       21265 :         register_phpinfo_constants(INIT_FUNC_ARGS_PASSTHRU);
    3593       21265 :         register_html_constants(INIT_FUNC_ARGS_PASSTHRU);
    3594       21265 :         register_string_constants(INIT_FUNC_ARGS_PASSTHRU);
    3595             : 
    3596       21265 :         BASIC_ADD_SUBMODULE(dl)
    3597       21265 :         BASIC_ADD_SUBMODULE(mail)
    3598       21265 :         BASIC_ADD_SUBMODULE(streams)
    3599       21265 :         BASIC_MINIT_SUBMODULE(file)
    3600       21265 :         BASIC_MINIT_SUBMODULE(pack)
    3601       21265 :         BASIC_MINIT_SUBMODULE(browscap)
    3602       21265 :         BASIC_MINIT_SUBMODULE(standard_filters)
    3603       21265 :         BASIC_MINIT_SUBMODULE(user_filters)
    3604       21265 :         BASIC_MINIT_SUBMODULE(password)
    3605             : 
    3606             : #if defined(HAVE_LOCALECONV) && defined(ZTS)
    3607             :         BASIC_MINIT_SUBMODULE(localeconv)
    3608             : #endif
    3609             : 
    3610             : #if defined(HAVE_NL_LANGINFO)
    3611       21265 :         BASIC_MINIT_SUBMODULE(nl_langinfo)
    3612             : #endif
    3613             : 
    3614             : #if HAVE_CRYPT
    3615       21265 :         BASIC_MINIT_SUBMODULE(crypt)
    3616             : #endif
    3617             : 
    3618       21265 :         BASIC_MINIT_SUBMODULE(lcg)
    3619             : 
    3620       21265 :         BASIC_MINIT_SUBMODULE(dir)
    3621             : #ifdef HAVE_SYSLOG_H
    3622       21265 :         BASIC_MINIT_SUBMODULE(syslog)
    3623             : #endif
    3624       21265 :         BASIC_MINIT_SUBMODULE(array)
    3625       21265 :         BASIC_MINIT_SUBMODULE(assert)
    3626       21265 :         BASIC_MINIT_SUBMODULE(url_scanner_ex)
    3627             : #ifdef PHP_CAN_SUPPORT_PROC_OPEN
    3628       21265 :         BASIC_MINIT_SUBMODULE(proc_open)
    3629             : #endif
    3630             : 
    3631       21265 :         BASIC_MINIT_SUBMODULE(user_streams)
    3632       21265 :         BASIC_MINIT_SUBMODULE(imagetypes)
    3633             : 
    3634       21265 :         php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC);
    3635       21265 :         php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC);
    3636             : #ifdef HAVE_GLOB
    3637       21265 :         php_register_url_stream_wrapper("glob", &php_glob_stream_wrapper TSRMLS_CC);
    3638             : #endif
    3639       21265 :         php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
    3640       21265 :         php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
    3641       21265 :         php_register_url_stream_wrapper("ftp", &php_stream_ftp_wrapper TSRMLS_CC);
    3642             : 
    3643             : #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
    3644             : # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
    3645       21265 :         BASIC_MINIT_SUBMODULE(dns)
    3646             : # endif
    3647             : #endif
    3648             : 
    3649       21265 :         return SUCCESS;
    3650             : }
    3651             : /* }}} */
    3652             : 
    3653       21298 : PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
    3654             : {
    3655             : #ifdef HAVE_SYSLOG_H
    3656       21298 :         PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
    3657             : #endif
    3658             : #ifdef ZTS
    3659             :         ts_free_id(basic_globals_id);
    3660             : #ifdef PHP_WIN32
    3661             :         ts_free_id(php_win32_core_globals_id);
    3662             : #endif
    3663             : #else
    3664       21298 :         basic_globals_dtor(&basic_globals TSRMLS_CC);
    3665             : #ifdef PHP_WIN32
    3666             :         php_win32_core_globals_dtor(&the_php_win32_core_globals TSRMLS_CC);
    3667             : #endif
    3668             : #endif
    3669             : 
    3670       21298 :         php_unregister_url_stream_wrapper("php" TSRMLS_CC);
    3671       21298 :         php_unregister_url_stream_wrapper("http" TSRMLS_CC);
    3672       21298 :         php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
    3673             : 
    3674       21298 :         BASIC_MSHUTDOWN_SUBMODULE(browscap)
    3675       21298 :         BASIC_MSHUTDOWN_SUBMODULE(array)
    3676       21298 :         BASIC_MSHUTDOWN_SUBMODULE(assert)
    3677       21298 :         BASIC_MSHUTDOWN_SUBMODULE(url_scanner_ex)
    3678       21298 :         BASIC_MSHUTDOWN_SUBMODULE(file)
    3679       21298 :         BASIC_MSHUTDOWN_SUBMODULE(standard_filters)
    3680             : #if defined(HAVE_LOCALECONV) && defined(ZTS)
    3681             :         BASIC_MSHUTDOWN_SUBMODULE(localeconv)
    3682             : #endif
    3683             : #if HAVE_CRYPT
    3684       21298 :         BASIC_MSHUTDOWN_SUBMODULE(crypt)
    3685             : #endif
    3686             : 
    3687       21298 :         zend_hash_destroy(&basic_submodules);
    3688       21298 :         return SUCCESS;
    3689             : }
    3690             : /* }}} */
    3691             : 
    3692       21222 : PHP_RINIT_FUNCTION(basic) /* {{{ */
    3693             : {
    3694       21222 :         memset(BG(strtok_table), 0, 256);
    3695             : 
    3696       21222 :         BG(serialize_lock) = 0;
    3697       21222 :         memset(&BG(serialize), 0, sizeof(BG(serialize)));
    3698       21222 :         memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
    3699             : 
    3700       21222 :         BG(strtok_string) = NULL;
    3701       21222 :         BG(strtok_zval) = NULL;
    3702       21222 :         BG(strtok_last) = NULL;
    3703       21222 :         BG(locale_string) = NULL;
    3704       21222 :         BG(array_walk_fci) = empty_fcall_info;
    3705       21222 :         BG(array_walk_fci_cache) = empty_fcall_info_cache;
    3706       21222 :         BG(user_compare_fci) = empty_fcall_info;
    3707       21222 :         BG(user_compare_fci_cache) = empty_fcall_info_cache;
    3708       21222 :         BG(page_uid) = -1;
    3709       21222 :         BG(page_gid) = -1;
    3710       21222 :         BG(page_inode) = -1;
    3711       21222 :         BG(page_mtime) = -1;
    3712             : #ifdef HAVE_PUTENV
    3713       21222 :         if (zend_hash_init(&BG(putenv_ht), 1, NULL, (void (*)(void *)) php_putenv_destructor, 0) == FAILURE) {
    3714           0 :                 return FAILURE;
    3715             :         }
    3716             : #endif
    3717       21222 :         BG(user_shutdown_function_names) = NULL;
    3718             : 
    3719       21222 :         PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
    3720             : #ifdef HAVE_SYSLOG_H
    3721       21222 :         BASIC_RINIT_SUBMODULE(syslog)
    3722             : #endif
    3723       21222 :         BASIC_RINIT_SUBMODULE(dir)
    3724       21222 :         BASIC_RINIT_SUBMODULE(url_scanner_ex)
    3725             : 
    3726             :         /* Setup default context */
    3727       21222 :         FG(default_context) = NULL;
    3728             : 
    3729             :         /* Default to global wrappers only */
    3730       21222 :         FG(stream_wrappers) = NULL;
    3731             : 
    3732             :         /* Default to global filters only */
    3733       21222 :         FG(stream_filters) = NULL;
    3734             : 
    3735       21222 :         return SUCCESS;
    3736             : }
    3737             : /* }}} */
    3738             : 
    3739       21257 : PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
    3740             : {
    3741       21257 :         if (BG(strtok_zval)) {
    3742           9 :                 zval_ptr_dtor(&BG(strtok_zval));
    3743             :         }
    3744       21257 :         BG(strtok_string) = NULL;
    3745       21257 :         BG(strtok_zval) = NULL;
    3746             : #ifdef HAVE_PUTENV
    3747       21257 :         zend_hash_destroy(&BG(putenv_ht));
    3748             : #endif
    3749             : 
    3750       21257 :         if (BG(umask) != -1) {
    3751           6 :                 umask(BG(umask));
    3752             :         }
    3753             : 
    3754             :         /* Check if locale was changed and change it back
    3755             :          * to the value in startup environment */
    3756       21257 :         if (BG(locale_string) != NULL) {
    3757         179 :                 setlocale(LC_ALL, "C");
    3758         179 :                 setlocale(LC_CTYPE, "");
    3759             :                 zend_update_current_locale();
    3760             :         }
    3761       21257 :         STR_FREE(BG(locale_string));
    3762       21257 :         BG(locale_string) = NULL;
    3763             : 
    3764             :         /* FG(stream_wrappers) and FG(stream_filters) are destroyed
    3765             :          * during php_request_shutdown() */
    3766             : 
    3767       21257 :         PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
    3768             : #ifdef HAVE_SYSLOG_H
    3769             : #ifdef PHP_WIN32
    3770             :         BASIC_RSHUTDOWN_SUBMODULE(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
    3771             : #endif
    3772             : #endif
    3773       21257 :         BASIC_RSHUTDOWN_SUBMODULE(assert)
    3774       21257 :         BASIC_RSHUTDOWN_SUBMODULE(url_scanner_ex)
    3775       21257 :         BASIC_RSHUTDOWN_SUBMODULE(streams)
    3776             : #ifdef PHP_WIN32
    3777             :         BASIC_RSHUTDOWN_SUBMODULE(win32_core_globals)
    3778             : #endif
    3779             : 
    3780       21257 :         if (BG(user_tick_functions)) {
    3781           3 :                 zend_llist_destroy(BG(user_tick_functions));
    3782           3 :                 efree(BG(user_tick_functions));
    3783           3 :                 BG(user_tick_functions) = NULL;
    3784             :         }
    3785             : 
    3786       21257 :         BASIC_RSHUTDOWN_SUBMODULE(user_filters)
    3787       21257 :         BASIC_RSHUTDOWN_SUBMODULE(browscap)
    3788             : 
    3789       21257 :         BG(page_uid) = -1;
    3790       21257 :         BG(page_gid) = -1;
    3791       21257 :         return SUCCESS;
    3792             : }
    3793             : /* }}} */
    3794             : 
    3795         151 : PHP_MINFO_FUNCTION(basic) /* {{{ */
    3796             : {
    3797         151 :         php_info_print_table_start();
    3798         151 :         BASIC_MINFO_SUBMODULE(dl)
    3799         151 :         BASIC_MINFO_SUBMODULE(mail)
    3800         151 :         php_info_print_table_end();
    3801         151 :         BASIC_MINFO_SUBMODULE(assert)
    3802         151 : }
    3803             : /* }}} */
    3804             : 
    3805             : /* {{{ proto mixed constant(string const_name)
    3806             :    Given the name of a constant this function will return the constant's associated value */
    3807         100 : PHP_FUNCTION(constant)
    3808             : {
    3809             :         char *const_name;
    3810             :         int const_name_len;
    3811             : 
    3812         100 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &const_name, &const_name_len) == FAILURE) {
    3813           3 :                 return;
    3814             :         }
    3815             : 
    3816          97 :         if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) {
    3817           3 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %s", const_name);
    3818           3 :                 RETURN_NULL();
    3819             :         }
    3820             : }
    3821             : /* }}} */
    3822             : 
    3823             : #ifdef HAVE_INET_NTOP
    3824             : /* {{{ proto string inet_ntop(string in_addr)
    3825             :    Converts a packed inet address to a human readable IP address string */
    3826          22 : PHP_NAMED_FUNCTION(php_inet_ntop)
    3827             : {
    3828             :         char *address;
    3829          22 :         int address_len, af = AF_INET;
    3830             :         char buffer[40];
    3831             : 
    3832          22 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) {
    3833           1 :                 RETURN_FALSE;
    3834             :         }
    3835             : 
    3836             : #ifdef HAVE_IPV6
    3837          21 :         if (address_len == 16) {
    3838          11 :                 af = AF_INET6;
    3839             :         } else
    3840             : #endif
    3841          10 :         if (address_len != 4) {
    3842           4 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid in_addr value");
    3843           4 :                 RETURN_FALSE;
    3844             :         }
    3845             : 
    3846          17 :         if (!inet_ntop(af, address, buffer, sizeof(buffer))) {
    3847           0 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "An unknown error occurred");
    3848           0 :                 RETURN_FALSE;
    3849             :         }
    3850             : 
    3851          17 :         RETURN_STRING(buffer, 1);
    3852             : }
    3853             : /* }}} */
    3854             : #endif /* HAVE_INET_NTOP */
    3855             : 
    3856             : #ifdef HAVE_INET_PTON
    3857             : /* {{{ proto string inet_pton(string ip_address)
    3858             :    Converts a human readable IP address to a packed binary string */
    3859          17 : PHP_NAMED_FUNCTION(php_inet_pton)
    3860             : {
    3861          17 :         int ret, af = AF_INET;
    3862             :         char *address;
    3863             :         int address_len;
    3864             :         char buffer[17];
    3865             : 
    3866          17 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &address, &address_len) == FAILURE) {
    3867           1 :                 RETURN_FALSE;
    3868             :         }
    3869             : 
    3870          16 :         memset(buffer, 0, sizeof(buffer));
    3871             : 
    3872             : #ifdef HAVE_IPV6
    3873          16 :         if (strchr(address, ':')) {
    3874           8 :                 af = AF_INET6;
    3875             :         } else
    3876             : #endif
    3877           8 :         if (!strchr(address, '.')) {
    3878           4 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
    3879           4 :                 RETURN_FALSE;
    3880             :         }
    3881             : 
    3882          12 :         ret = inet_pton(af, address, buffer);
    3883             : 
    3884          12 :         if (ret <= 0) {
    3885           0 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
    3886           0 :                 RETURN_FALSE;
    3887             :         }
    3888             : 
    3889          12 :         RETURN_STRINGL(buffer, af == AF_INET ? 4 : 16, 1);
    3890             : }
    3891             : /* }}} */
    3892             : #endif /* HAVE_INET_PTON */
    3893             : 
    3894             : /* {{{ proto int ip2long(string ip_address)
    3895             :    Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address */
    3896          49 : PHP_FUNCTION(ip2long)
    3897             : {
    3898             :         char *addr;
    3899             :         int addr_len;
    3900             : #ifdef HAVE_INET_PTON
    3901             :         struct in_addr ip;
    3902             : #else
    3903             :         unsigned long int ip;
    3904             : #endif
    3905             : 
    3906          49 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &addr, &addr_len) == FAILURE) {
    3907          10 :                 return;
    3908             :         }
    3909             : 
    3910             : #ifdef HAVE_INET_PTON
    3911          39 :         if (addr_len == 0 || inet_pton(AF_INET, addr, &ip) != 1) {
    3912          27 :                 RETURN_FALSE;
    3913             :         }
    3914          12 :         RETURN_LONG(ntohl(ip.s_addr));
    3915             : #else
    3916             :         if (addr_len == 0 || (ip = inet_addr(addr)) == INADDR_NONE) {
    3917             :                 /* The only special case when we should return -1 ourselves,
    3918             :                  * because inet_addr() considers it wrong. We return 0xFFFFFFFF and
    3919             :                  * not -1 or ~0 because of 32/64bit issues. */
    3920             :                 if (addr_len == sizeof("255.255.255.255") - 1 &&
    3921             :                         !memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)
    3922             :                 ) {
    3923             :                         RETURN_LONG(0xFFFFFFFF);
    3924             :                 }
    3925             :                 RETURN_FALSE;
    3926             :         }
    3927             :         RETURN_LONG(ntohl(ip));
    3928             : #endif
    3929             : }
    3930             : /* }}} */
    3931             : 
    3932             : /* {{{ proto string long2ip(int proper_address)
    3933             :    Converts an (IPv4) Internet network address into a string in Internet standard dotted format */
    3934          36 : PHP_FUNCTION(long2ip)
    3935             : {
    3936             :         /* "It's a long but it's not, PHP ints are signed */
    3937             :         char *ip;
    3938             :         int ip_len;
    3939             :         unsigned long n;
    3940             :         struct in_addr myaddr;
    3941             : #ifdef HAVE_INET_PTON
    3942             :         char str[40];
    3943             : #endif
    3944             : 
    3945          36 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip, &ip_len) == FAILURE) {
    3946          10 :                 return;
    3947             :         }
    3948             : 
    3949          26 :         n = strtoul(ip, NULL, 0);
    3950             : 
    3951          26 :         myaddr.s_addr = htonl(n);
    3952             : #ifdef HAVE_INET_PTON
    3953          26 :         if (inet_ntop(AF_INET, &myaddr, str, sizeof(str))) {
    3954          26 :                 RETURN_STRING(str, 1);
    3955             :         } else {
    3956           0 :                 RETURN_FALSE;
    3957             :         }
    3958             : #else
    3959             :         RETURN_STRING(inet_ntoa(myaddr), 1);
    3960             : #endif
    3961             : }
    3962             : /* }}} */
    3963             : 
    3964             : /********************
    3965             :  * System Functions *
    3966             :  ********************/
    3967             : 
    3968             : /* {{{ proto string getenv(string varname)
    3969             :    Get the value of an environment variable */
    3970       30343 : PHP_FUNCTION(getenv)
    3971             : {
    3972             :         char *ptr, *str;
    3973             :         int str_len;
    3974             : 
    3975       30343 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
    3976           0 :                 RETURN_FALSE;
    3977             :         }
    3978             : 
    3979             :         /* SAPI method returns an emalloc()'d string */
    3980       30343 :         ptr = sapi_getenv(str, str_len TSRMLS_CC);
    3981       30343 :         if (ptr) {
    3982           0 :                 RETURN_STRING(ptr, 0);
    3983             :         }
    3984             : #ifdef PHP_WIN32
    3985             :         {
    3986             :                 char dummybuf;
    3987             :                 int size;
    3988             : 
    3989             :                 SetLastError(0);
    3990             :                 /*If the given bugger is not large enough to hold the data, the return value is 
    3991             :                 the buffer size,  in characters, required to hold the string and its terminating 
    3992             :                 null character. We use this return value to alloc the final buffer. */
    3993             :                 size = GetEnvironmentVariableA(str, &dummybuf, 0);
    3994             :                 if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
    3995             :                                 /* The environment variable doesn't exist. */
    3996             :                                 RETURN_FALSE;
    3997             :                 }
    3998             : 
    3999             :                 if (size == 0) {
    4000             :                                 /* env exists, but it is empty */
    4001             :                                 RETURN_EMPTY_STRING();
    4002             :                 }
    4003             : 
    4004             :                 ptr = emalloc(size);
    4005             :                 size = GetEnvironmentVariableA(str, ptr, size);
    4006             :                 if (size == 0) {
    4007             :                                 /* has been removed between the two calls */
    4008             :                                 efree(ptr);
    4009             :                                 RETURN_EMPTY_STRING();
    4010             :                 } else {
    4011             :                         RETURN_STRING(ptr, 0);
    4012             :                 }
    4013             :         }
    4014             : #else
    4015             :         /* system method returns a const */
    4016       30343 :         ptr = getenv(str);
    4017       30343 :         if (ptr) {
    4018       16545 :                 RETURN_STRING(ptr, 1);
    4019             :         }
    4020             : #endif
    4021       13798 :         RETURN_FALSE;
    4022             : }
    4023             : /* }}} */
    4024             : 
    4025             : #ifdef HAVE_PUTENV
    4026             : /* {{{ proto bool putenv(string setting)
    4027             :    Set the value of an environment variable */
    4028        1277 : PHP_FUNCTION(putenv)
    4029             : {
    4030             :         char *setting;
    4031             :         int setting_len;
    4032             :         char *p, **env;
    4033             :         putenv_entry pe;
    4034             : #ifdef PHP_WIN32
    4035             :         char *value = NULL;
    4036             :         int equals = 0;
    4037             :         int error_code;
    4038             : #endif
    4039             : 
    4040        1277 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &setting, &setting_len) == FAILURE) {
    4041           0 :                 return;
    4042             :         }
    4043             :     
    4044        1277 :     if(setting_len == 0 || setting[0] == '=') {
    4045           2 :         php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax");
    4046           2 :         RETURN_FALSE;
    4047             :     }
    4048             : 
    4049        1275 :         pe.putenv_string = estrndup(setting, setting_len);
    4050        1275 :         pe.key = estrndup(setting, setting_len);
    4051        1275 :         if ((p = strchr(pe.key, '='))) {        /* nullify the '=' if there is one */
    4052        1174 :                 *p = '\0';
    4053             : #ifdef PHP_WIN32
    4054             :                 equals = 1;
    4055             : #endif
    4056             :         }
    4057             : 
    4058        1275 :         pe.key_len = strlen(pe.key);
    4059             : #ifdef PHP_WIN32
    4060             :         if (equals) {
    4061             :                 if (pe.key_len < setting_len - 1) {
    4062             :                         value = p + 1;
    4063             :                 } else {
    4064             :                         /* empty string*/
    4065             :                         value = p;
    4066             :                 }
    4067             :         }
    4068             : #endif
    4069             : 
    4070        1275 :         zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
    4071             : 
    4072             :         /* find previous value */
    4073        1275 :         pe.previous_value = NULL;
    4074       59487 :         for (env = environ; env != NULL && *env != NULL; env++) {
    4075       58272 :                 if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') {  /* found it */
    4076             : #if defined(PHP_WIN32)
    4077             :                         /* must copy previous value because MSVCRT's putenv can free the string without notice */
    4078             :                         pe.previous_value = estrdup(*env);
    4079             : #else
    4080          60 :                         pe.previous_value = *env;
    4081             : #endif
    4082          60 :                         break;
    4083             :                 }
    4084             :         }
    4085             : 
    4086             : #if HAVE_UNSETENV
    4087        1275 :         if (!p) { /* no '=' means we want to unset it */
    4088         101 :                 unsetenv(pe.putenv_string);
    4089             :         }
    4090        1275 :         if (!p || putenv(pe.putenv_string) == 0) { /* success */
    4091             : #else
    4092             : # ifndef PHP_WIN32
    4093             :         if (putenv(pe.putenv_string) == 0) { /* success */
    4094             : # else
    4095             :         error_code = SetEnvironmentVariable(pe.key, value);
    4096             : #  if _MSC_VER < 1500
    4097             :         /* Yet another VC6 bug, unset may return env not found */
    4098             :         if (error_code != 0 || 
    4099             :                 (error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
    4100             : #  else
    4101             :         if (error_code != 0) { /* success */
    4102             : #  endif
    4103             : # endif
    4104             : #endif
    4105        1275 :                 zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);
    4106             : #ifdef HAVE_TZSET
    4107        1275 :                 if (!strncmp(pe.key, "TZ", pe.key_len)) {
    4108          14 :                         tzset();
    4109             :                 }
    4110             : #endif
    4111        1275 :                 RETURN_TRUE;
    4112             :         } else {
    4113           0 :                 efree(pe.putenv_string);
    4114           0 :                 efree(pe.key);
    4115           0 :                 RETURN_FALSE;
    4116             :         }
    4117             : }
    4118             : /* }}} */
    4119             : #endif
    4120             : 
    4121             : /* {{{ free_argv()
    4122             :    Free the memory allocated to an argv array. */
    4123           8 : static void free_argv(char **argv, int argc)
    4124             : {
    4125             :         int i;
    4126             : 
    4127           8 :         if (argv) {
    4128          60 :                 for (i = 0; i < argc; i++) {
    4129          52 :                         if (argv[i]) {
    4130          52 :                                 efree(argv[i]);
    4131             :                         }
    4132             :                 }
    4133           8 :                 efree(argv);
    4134             :         }
    4135           8 : }
    4136             : /* }}} */
    4137             : 
    4138             : /* {{{ free_longopts()
    4139             :    Free the memory allocated to an longopt array. */
    4140           8 : static void free_longopts(opt_struct *longopts)
    4141             : {
    4142             :         opt_struct *p;
    4143             : 
    4144           8 :         if (longopts) {
    4145          47 :                 for (p = longopts; p && p->opt_char != '-'; p++) {
    4146          39 :                         if (p->opt_name != NULL) {
    4147          10 :                                 efree((char *)(p->opt_name));
    4148             :                         }
    4149             :                 }
    4150             :         }
    4151           8 : }
    4152             : /* }}} */
    4153             : 
    4154             : /* {{{ parse_opts()
    4155             :    Convert the typical getopt input characters to the php_getopt struct array */
    4156           8 : static int parse_opts(char * opts, opt_struct ** result)
    4157             : {
    4158           8 :         opt_struct * paras = NULL;
    4159           8 :         unsigned int i, count = 0;
    4160             : 
    4161          45 :         for (i = 0; i < strlen(opts); i++) {
    4162         153 :                 if ((opts[i] >= 48 && opts[i] <= 57) ||
    4163          58 :                         (opts[i] >= 65 && opts[i] <= 90) ||
    4164          58 :                         (opts[i] >= 97 && opts[i] <= 122)
    4165             :                 ) {
    4166          29 :                         count++;
    4167             :                 }
    4168             :         }
    4169             : 
    4170           8 :         paras = safe_emalloc(sizeof(opt_struct), count, 0);
    4171           8 :         memset(paras, 0, sizeof(opt_struct) * count);
    4172           8 :         *result = paras;
    4173         161 :         while ( (*opts >= 48 && *opts <= 57) || /* 0 - 9 */
    4174          58 :                         (*opts >= 65 && *opts <= 90) || /* A - Z */
    4175          58 :                         (*opts >= 97 && *opts <= 122)   /* a - z */
    4176             :         ) {
    4177          29 :                 paras->opt_char = *opts;
    4178          29 :                 paras->need_param = (*(++opts) == ':') ? 1 : 0;
    4179          29 :                 paras->opt_name = NULL;
    4180          29 :                 if (paras->need_param == 1) {
    4181           7 :                         opts++;
    4182           7 :                         if (*opts == ':') {
    4183           1 :                                 paras->need_param++;
    4184           1 :                                 opts++;
    4185             :                         }
    4186             :                 }
    4187          29 :                 paras++;
    4188             :         }
    4189           8 :         return count;
    4190             : }
    4191             : /* }}} */
    4192             : 
    4193             : /* {{{ proto array getopt(string options [, array longopts])
    4194             :    Get options from the command line argument list */
    4195           9 : PHP_FUNCTION(getopt)
    4196             : {
    4197           9 :         char *options = NULL, **argv = NULL;
    4198           9 :         char opt[2] = { '\0' };
    4199             :         char *optname;
    4200           9 :         int argc = 0, options_len = 0, len, o;
    4201           9 :         char *php_optarg = NULL;
    4202           9 :         int php_optind = 1;
    4203           9 :         zval *val, **args = NULL, *p_longopts = NULL;
    4204           9 :         int optname_len = 0;
    4205             :         opt_struct *opts, *orig_opts;
    4206             : 
    4207           9 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &options, &options_len, &p_longopts) == FAILURE) {
    4208           0 :                 RETURN_FALSE;
    4209             :         }
    4210             : 
    4211             :         /* Get argv from the global symbol table. We calculate argc ourselves
    4212             :          * in order to be on the safe side, even though it is also available
    4213             :          * from the symbol table. */
    4214          38 :         if (PG(http_globals)[TRACK_VARS_SERVER] &&
    4215           9 :                 (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
    4216          12 :                 zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY
    4217             :         ) {
    4218           8 :                 int pos = 0;
    4219             :                 zval **entry;
    4220             : 
    4221           8 :                 argc = zend_hash_num_elements(Z_ARRVAL_PP(args));
    4222             : 
    4223             :                 /* Attempt to allocate enough memory to hold all of the arguments
    4224             :                  * and a trailing NULL */
    4225           8 :                 argv = (char **) safe_emalloc(sizeof(char *), (argc + 1), 0);
    4226             : 
    4227             :                 /* Reset the array indexes. */
    4228           8 :                 zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args));
    4229             : 
    4230             :                 /* Iterate over the hash to construct the argv array. */
    4231          68 :                 while (zend_hash_get_current_data(Z_ARRVAL_PP(args), (void **)&entry) == SUCCESS) {
    4232          52 :                         zval arg, *arg_ptr = *entry;
    4233             : 
    4234          52 :                         if (Z_TYPE_PP(entry) != IS_STRING) {
    4235           5 :                                 arg = **entry;
    4236             :                                 zval_copy_ctor(&arg);
    4237           5 :                                 convert_to_string(&arg);
    4238           5 :                                 arg_ptr = &arg;
    4239             :                         }
    4240             : 
    4241          52 :                         argv[pos++] = estrdup(Z_STRVAL_P(arg_ptr));
    4242             : 
    4243          52 :                         if (arg_ptr != *entry) {
    4244             :                                 zval_dtor(&arg);
    4245             :                         }
    4246             : 
    4247          52 :                         zend_hash_move_forward(Z_ARRVAL_PP(args));
    4248             :                 }
    4249             : 
    4250             :                 /* The C Standard requires argv[argc] to be NULL - this might
    4251             :                  * keep some getopt implementations happy. */
    4252           8 :                 argv[argc] = NULL;
    4253             :         } else {
    4254             :                 /* Return false if we can't find argv. */
    4255           1 :                 RETURN_FALSE;
    4256             :         }
    4257             : 
    4258           8 :         len = parse_opts(options, &opts);
    4259             : 
    4260           8 :         if (p_longopts) {
    4261             :                 int count;
    4262             :                 zval **entry;
    4263             : 
    4264           4 :                 count = zend_hash_num_elements(Z_ARRVAL_P(p_longopts));
    4265             : 
    4266             :                 /* the first <len> slots are filled by the one short ops
    4267             :                  * we now extend our array and jump to the new added structs */
    4268           4 :                 opts = (opt_struct *) erealloc(opts, sizeof(opt_struct) * (len + count + 1));
    4269           4 :                 orig_opts = opts;
    4270           4 :                 opts += len;
    4271             : 
    4272           4 :                 memset(opts, 0, count * sizeof(opt_struct));
    4273             : 
    4274             :                 /* Reset the array indexes. */
    4275           4 :                 zend_hash_internal_pointer_reset(Z_ARRVAL_P(p_longopts));
    4276             : 
    4277             :                 /* Iterate over the hash to construct the argv array. */
    4278          18 :                 while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), (void **)&entry) == SUCCESS) {
    4279          10 :                         zval arg, *arg_ptr = *entry;
    4280             : 
    4281          10 :                         if (Z_TYPE_PP(entry) != IS_STRING) {
    4282           5 :                                 arg = **entry;
    4283             :                                 zval_copy_ctor(&arg);
    4284           5 :                                 convert_to_string(&arg);
    4285           5 :                                 arg_ptr = &arg;
    4286             :                         }
    4287             : 
    4288          10 :                         opts->need_param = 0;
    4289          10 :                         opts->opt_name = estrdup(Z_STRVAL_P(arg_ptr));
    4290          10 :                         len = strlen(opts->opt_name);
    4291          10 :                         if ((len > 0) && (opts->opt_name[len - 1] == ':')) {
    4292           3 :                                 opts->need_param++;
    4293           3 :                                 opts->opt_name[len - 1] = '\0';
    4294           3 :                                 if ((len > 1) && (opts->opt_name[len - 2] == ':')) {
    4295           1 :                                         opts->need_param++;
    4296           1 :                                         opts->opt_name[len - 2] = '\0';
    4297             :                                 }
    4298             :                         }
    4299          10 :                         opts->opt_char = 0;
    4300          10 :                         opts++;
    4301             : 
    4302          10 :                         if (arg_ptr != *entry) {
    4303             :                                 zval_dtor(&arg);
    4304             :                         }
    4305             : 
    4306          10 :                         zend_hash_move_forward(Z_ARRVAL_P(p_longopts));
    4307             :                 }
    4308             :         } else {
    4309           4 :                 opts = (opt_struct*) erealloc(opts, sizeof(opt_struct) * (len + 1));
    4310           4 :                 orig_opts = opts;
    4311           4 :                 opts += len;
    4312             :         }
    4313             : 
    4314             :         /* php_getopt want to identify the last param */
    4315           8 :         opts->opt_char   = '-';
    4316           8 :         opts->need_param = 0;
    4317           8 :         opts->opt_name   = NULL;
    4318             : 
    4319             :         /* Initialize the return value as an array. */
    4320           8 :         array_init(return_value);
    4321             : 
    4322             :         /* after our pointer arithmetic jump back to the first element */
    4323           8 :         opts = orig_opts;
    4324             : 
    4325          60 :         while ((o = php_getopt(argc, argv, opts, &php_optarg, &php_optind, 0, 1)) != -1) {
    4326             :                 /* Skip unknown arguments. */
    4327          44 :                 if (o == '?') {
    4328           1 :                         continue;
    4329             :                 }
    4330             : 
    4331             :                 /* Prepare the option character and the argument string. */
    4332          43 :                 if (o == 0) {
    4333          11 :                         optname = opts[php_optidx].opt_name;
    4334             :                 } else {
    4335          32 :                         if (o == 1) {
    4336           0 :                                 o = '-';
    4337             :                         }
    4338          32 :                         opt[0] = o;
    4339          32 :                         optname = opt;
    4340             :                 }
    4341             : 
    4342          43 :                 MAKE_STD_ZVAL(val);
    4343          43 :                 if (php_optarg != NULL) {
    4344             :                         /* keep the arg as binary, since the encoding is not known */
    4345          13 :                         ZVAL_STRING(val, php_optarg, 1);
    4346             :                 } else {
    4347          30 :                         ZVAL_FALSE(val);
    4348             :                 }
    4349             : 
    4350             :                 /* Add this option / argument pair to the result hash. */
    4351          43 :                 optname_len = strlen(optname);
    4352          57 :                 if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) {
    4353             :                         /* numeric string */
    4354          14 :                         int optname_int = atoi(optname);
    4355          14 :                         if (zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) {
    4356           8 :                                 if (Z_TYPE_PP(args) != IS_ARRAY) {
    4357          12 :                                         convert_to_array_ex(args);
    4358             :                                 }
    4359           8 :                                 zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
    4360             :                         } else {
    4361           6 :                                 zend_hash_index_update(HASH_OF(return_value), optname_int, &val, sizeof(zval *), NULL);
    4362             :                         }
    4363             :                 } else {
    4364             :                         /* other strings */
    4365          29 :                         if (zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) {
    4366          15 :                                 if (Z_TYPE_PP(args) != IS_ARRAY) {
    4367          24 :                                         convert_to_array_ex(args);
    4368             :                                 }
    4369          15 :                                 zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
    4370             :                         } else {
    4371          14 :                                 zend_hash_add(HASH_OF(return_value), optname, strlen(optname)+1, (void *)&val, sizeof(zval *), NULL);
    4372             :                         }
    4373             :                 }
    4374             : 
    4375          43 :                 php_optarg = NULL;
    4376             :         }
    4377             : 
    4378           8 :         free_longopts(orig_opts);
    4379           8 :         efree(orig_opts);
    4380           8 :         free_argv(argv, argc);
    4381             : }
    4382             : /* }}} */
    4383             : 
    4384             : /* {{{ proto void flush(void)
    4385             :    Flush the output buffer */
    4386       13597 : PHP_FUNCTION(flush)
    4387             : {
    4388       13597 :         sapi_flush(TSRMLS_C);
    4389       13597 : }
    4390             : /* }}} */
    4391             : 
    4392             : /* {{{ proto void sleep(int seconds)
    4393             :    Delay for a given number of seconds */
    4394          44 : PHP_FUNCTION(sleep)
    4395             : {
    4396             :         long num;
    4397             : 
    4398          44 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) {
    4399           2 :                 RETURN_FALSE;
    4400             :         }
    4401          42 :         if (num < 0) {
    4402           1 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of seconds must be greater than or equal to 0");
    4403           1 :                 RETURN_FALSE;
    4404             :         }
    4405             : #ifdef PHP_SLEEP_NON_VOID
    4406          41 :         RETURN_LONG(php_sleep(num));
    4407             : #else
    4408             :         php_sleep(num);
    4409             : #endif
    4410             : 
    4411             : }
    4412             : /* }}} */
    4413             : 
    4414             : /* {{{ proto void usleep(int micro_seconds)
    4415             :    Delay for a given number of micro seconds */
    4416        1981 : PHP_FUNCTION(usleep)
    4417             : {
    4418             : #if HAVE_USLEEP
    4419             :         long num;
    4420             : 
    4421        1981 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) {
    4422           2 :                 return;
    4423             :         }
    4424        1979 :         if (num < 0) {
    4425           1 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of microseconds must be greater than or equal to 0");
    4426           1 :                 RETURN_FALSE;
    4427             :         }
    4428        1978 :         usleep(num);
    4429             : #endif
    4430             : }
    4431             : /* }}} */
    4432             : 
    4433             : #if HAVE_NANOSLEEP
    4434             : /* {{{ proto mixed time_nanosleep(long seconds, long nanoseconds)
    4435             :    Delay for a number of seconds and nano seconds */
    4436           8 : PHP_FUNCTION(time_nanosleep)
    4437             : {
    4438             :         long tv_sec, tv_nsec;
    4439             :         struct timespec php_req, php_rem;
    4440             : 
    4441           8 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) {
    4442           2 :                 return;
    4443             :         }
    4444             : 
    4445           6 :         if (tv_sec < 0) {
    4446           2 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds value must be greater than 0");
    4447           2 :                 RETURN_FALSE;
    4448             :         }
    4449           4 :         if (tv_nsec < 0) {
    4450           2 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "The nanoseconds value must be greater than 0");
    4451           2 :                 RETURN_FALSE;
    4452             :         }
    4453             : 
    4454           2 :         php_req.tv_sec = (time_t) tv_sec;
    4455           2 :         php_req.tv_nsec = tv_nsec;
    4456           2 :         if (!nanosleep(&php_req, &php_rem)) {
    4457           1 :                 RETURN_TRUE;
    4458           1 :         } else if (errno == EINTR) {
    4459           0 :                 array_init(return_value);
    4460           0 :                 add_assoc_long_ex(return_value, "seconds", sizeof("seconds"), php_rem.tv_sec);
    4461           0 :                 add_assoc_long_ex(return_value, "nanoseconds", sizeof("nanoseconds"), php_rem.tv_nsec);
    4462           0 :                 return;
    4463           1 :         } else if (errno == EINVAL) {
    4464           1 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "nanoseconds was not in the range 0 to 999 999 999 or seconds was negative");
    4465             :         }
    4466             : 
    4467           1 :         RETURN_FALSE;
    4468             : }
    4469             : /* }}} */
    4470             : 
    4471             : /* {{{ proto mixed time_sleep_until(float timestamp)
    4472             :    Make the script sleep until the specified time */
    4473           4 : PHP_FUNCTION(time_sleep_until)
    4474             : {
    4475             :         double d_ts, c_ts;
    4476             :         struct timeval tm;
    4477             :         struct timespec php_req, php_rem;
    4478             : 
    4479           4 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &d_ts) == FAILURE) {
    4480           2 :                 return;
    4481             :         }
    4482             : 
    4483           2 :         if (gettimeofday((struct timeval *) &tm, NULL) != 0) {
    4484           0 :                 RETURN_FALSE;
    4485             :         }
    4486             : 
    4487           2 :         c_ts = (double)(d_ts - tm.tv_sec - tm.tv_usec / 1000000.00);
    4488           2 :         if (c_ts < 0) {
    4489           1 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sleep until to time is less than current time");
    4490           1 :                 RETURN_FALSE;
    4491             :         }
    4492             : 
    4493           1 :         php_req.tv_sec = (time_t) c_ts;
    4494           1 :         if (php_req.tv_sec > c_ts) { /* rounding up occurred */
    4495           0 :                 php_req.tv_sec--;
    4496             :         }
    4497             :         /* 1sec = 1000000000 nanoseconds */
    4498           1 :         php_req.tv_nsec = (long) ((c_ts - php_req.tv_sec) * 1000000000.00);
    4499             : 
    4500           2 :         while (nanosleep(&php_req, &php_rem)) {
    4501           0 :                 if (errno == EINTR) {
    4502           0 :                         php_req.tv_sec = php_rem.tv_sec;
    4503           0 :                         php_req.tv_nsec = php_rem.tv_nsec;
    4504             :                 } else {
    4505           0 :                         RETURN_FALSE;
    4506             :                 }
    4507             :         }
    4508             : 
    4509           1 :         RETURN_TRUE;
    4510             : }
    4511             : /* }}} */
    4512             : #endif
    4513             : 
    4514             : /* {{{ proto string get_current_user(void)
    4515             :    Get the name of the owner of the current PHP script */
    4516           4 : PHP_FUNCTION(get_current_user)
    4517             : {
    4518           4 :         if (zend_parse_parameters_none() == FAILURE) {
    4519           1 :                 return;
    4520             :         }
    4521             : 
    4522           3 :         RETURN_STRING(php_get_current_user(TSRMLS_C), 1);
    4523             : }
    4524             : /* }}} */
    4525             : 
    4526             : /* {{{ add_config_entry_cb
    4527             :  */
    4528           0 : static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
    4529             : {
    4530           0 :         zval *retval = (zval *)va_arg(args, zval*);
    4531             :         zval *tmp;
    4532             : 
    4533           0 :         if (Z_TYPE_P(entry) == IS_STRING) {
    4534           0 :                 if (hash_key->nKeyLength > 0) {
    4535           0 :                         add_assoc_stringl_ex(retval, hash_key->arKey, hash_key->nKeyLength, Z_STRVAL_P(entry), Z_STRLEN_P(entry), 1);
    4536             :                 } else {
    4537           0 :                         add_index_stringl(retval, hash_key->h, Z_STRVAL_P(entry), Z_STRLEN_P(entry), 1);
    4538             :                 }
    4539           0 :         } else if (Z_TYPE_P(entry) == IS_ARRAY) {
    4540           0 :                 MAKE_STD_ZVAL(tmp);
    4541           0 :                 array_init(tmp);
    4542           0 :                 zend_hash_apply_with_arguments(Z_ARRVAL_P(entry) TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, tmp);
    4543           0 :                 add_assoc_zval_ex(retval, hash_key->arKey, hash_key->nKeyLength, tmp);
    4544             :         }
    4545           0 :         return 0;
    4546             : }
    4547             : /* }}} */
    4548             : 
    4549             : /* {{{ proto mixed get_cfg_var(string option_name)
    4550             :    Get the value of a PHP configuration option */
    4551          38 : PHP_FUNCTION(get_cfg_var)
    4552             : {
    4553             :         char *varname;
    4554             :         int varname_len;
    4555             :         zval *retval;
    4556             : 
    4557          38 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
    4558           7 :                 return;
    4559             :         }
    4560             : 
    4561          31 :         retval = cfg_get_entry(varname, varname_len + 1);
    4562             : 
    4563          31 :         if (retval) {
    4564           8 :                 if (Z_TYPE_P(retval) == IS_ARRAY) {
    4565           0 :                         array_init(return_value);
    4566           0 :                         zend_hash_apply_with_arguments(Z_ARRVAL_P(retval) TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, return_value);
    4567           0 :                         return;
    4568             :                 } else {
    4569           8 :                         RETURN_STRING(Z_STRVAL_P(retval), 1);
    4570             :                 }
    4571             :         } else {
    4572          23 :                 RETURN_FALSE;
    4573             :         }
    4574             : }
    4575             : /* }}} */
    4576             : 
    4577             : /* {{{ proto bool set_magic_quotes_runtime(int new_setting)
    4578             :    magic_quotes_runtime is not supported anymore */
    4579           4 : PHP_FUNCTION(set_magic_quotes_runtime)
    4580             : {
    4581             :         zend_bool new_setting;
    4582             : 
    4583           4 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &new_setting) == FAILURE) {
    4584           2 :                 return;
    4585             :         }
    4586             :         
    4587           2 :         if (new_setting) {
    4588           1 :                 php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore");
    4589             :         }
    4590           1 :         RETURN_FALSE;
    4591             : }
    4592             : /* }}} */
    4593             : 
    4594             : /* {{{ proto int get_magic_quotes_runtime(void)
    4595             :    Get the current active configuration setting of magic_quotes_runtime */
    4596           5 : PHP_FUNCTION(get_magic_quotes_runtime)
    4597             : {
    4598           5 :         if (zend_parse_parameters_none() == FAILURE) {
    4599           1 :                 return;
    4600             :         }
    4601           4 :         RETURN_FALSE;
    4602             : }
    4603             : /* }}} */
    4604             : 
    4605             : /* {{{ proto int get_magic_quotes_gpc(void)
    4606             :    Get the current active configuration setting of magic_quotes_gpc */
    4607           3 : PHP_FUNCTION(get_magic_quotes_gpc)
    4608             : {
    4609           3 :         if (zend_parse_parameters_none() == FAILURE) {
    4610           1 :                 return;
    4611             :         }
    4612           2 :         RETURN_FALSE;
    4613             : }
    4614             : /* }}} */
    4615             : 
    4616             : /*
    4617             :         1st arg = error message
    4618             :         2nd arg = error option
    4619             :         3rd arg = optional parameters (email address or tcp address)
    4620             :         4th arg = used for additional headers if email
    4621             : 
    4622             : error options:
    4623             :         0 = send to php_error_log (uses syslog or file depending on ini setting)
    4624             :         1 = send via email to 3rd parameter 4th option = additional headers
    4625             :         2 = send via tcp/ip to 3rd parameter (name or ip:port)
    4626             :         3 = save to file in 3rd parameter
    4627             :         4 = send to SAPI logger directly
    4628             : */
    4629             : 
    4630             : /* {{{ proto bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])
    4631             :    Send an error message somewhere */
    4632           5 : PHP_FUNCTION(error_log)
    4633             : {
    4634           5 :         char *message, *opt = NULL, *headers = NULL;
    4635           5 :         int message_len, opt_len = 0, headers_len = 0;
    4636           5 :         int opt_err = 0, argc = ZEND_NUM_ARGS();
    4637           5 :         long erropt = 0;
    4638             : 
    4639           5 :         if (zend_parse_parameters(argc TSRMLS_CC, "s|lps", &message, &message_len, &erropt, &opt, &opt_len, &headers, &headers_len) == FAILURE) {
    4640           0 :                 return;
    4641             :         }
    4642             : 
    4643           5 :         if (argc > 1) {
    4644           4 :                 opt_err = erropt;
    4645             :         }
    4646             : 
    4647           5 :         if (_php_error_log_ex(opt_err, message, message_len, opt, headers TSRMLS_CC) == FAILURE) {
    4648           3 :                 RETURN_FALSE;
    4649             :         }
    4650             : 
    4651           2 :         RETURN_TRUE;
    4652             : }
    4653             : /* }}} */
    4654             : 
    4655             : /* For BC (not binary-safe!) */
    4656           0 : PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC) /* {{{ */
    4657             : {
    4658           0 :         return _php_error_log_ex(opt_err, message, (opt_err == 3) ? strlen(message) : 0, opt, headers TSRMLS_CC);
    4659             : }
    4660             : /* }}} */
    4661             : 
    4662           5 : PHPAPI int _php_error_log_ex(int opt_err, char *message, int message_len, char *opt, char *headers TSRMLS_DC) /* {{{ */
    4663             : {
    4664           5 :         php_stream *stream = NULL;
    4665             : 
    4666           5 :         switch (opt_err)
    4667             :         {
    4668             :                 case 1:         /*send an email */
    4669           0 :                         if (!php_mail(opt, "PHP error_log message", message, headers, NULL TSRMLS_CC)) {
    4670           0 :                                 return FAILURE;
    4671             :                         }
    4672           0 :                         break;
    4673             : 
    4674             :                 case 2:         /*send to an address */
    4675           0 :                         php_error_docref(NULL TSRMLS_CC, E_WARNING, "TCP/IP option not available!");
    4676           0 :                         return FAILURE;
    4677             :                         break;
    4678             : 
    4679             :                 case 3:         /*save to a file */
    4680           4 :                         stream = php_stream_open_wrapper(opt, "a", IGNORE_URL_WIN | REPORT_ERRORS, NULL);
    4681           4 :                         if (!stream) {
    4682           3 :                                 return FAILURE;
    4683             :                         }
    4684           1 :                         php_stream_write(stream, message, message_len);
    4685           1 :                         php_stream_close(stream);
    4686           1 :                         break;
    4687             : 
    4688             :                 case 4: /* send to SAPI */
    4689           0 :                         if (sapi_module.log_message) {
    4690           0 :                                 sapi_module.log_message(message TSRMLS_CC);
    4691             :                         } else {
    4692           0 :                                 return FAILURE;
    4693             :                         }
    4694           0 :                         break;
    4695             : 
    4696             :                 default:
    4697           1 :                         php_log_err(message TSRMLS_CC);
    4698             :                         break;
    4699             :         }
    4700           2 :         return SUCCESS;
    4701             : }
    4702             : /* }}} */
    4703             : 
    4704             : /* {{{ proto array error_get_last()
    4705             :    Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet. */
    4706           7 : PHP_FUNCTION(error_get_last)
    4707             : {
    4708           7 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
    4709           1 :                 return;
    4710             :         }
    4711             : 
    4712           6 :         if (PG(last_error_message)) {
    4713           5 :                 array_init(return_value);
    4714           5 :                 add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type));
    4715           5 :                 add_assoc_string_ex(return_value, "message", sizeof("message"), PG(last_error_message), 1);
    4716           5 :                 add_assoc_string_ex(return_value, "file", sizeof("file"), PG(last_error_file)?PG(last_error_file):"-", 1 );
    4717           5 :                 add_assoc_long_ex(return_value, "line", sizeof("line"), PG(last_error_lineno));
    4718             :         }
    4719             : }
    4720             : /* }}} */
    4721             : 
    4722             : /* {{{ proto mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])
    4723             :    Call a user function which is the first parameter */
    4724         747 : PHP_FUNCTION(call_user_func)
    4725             : {
    4726         747 :         zval *retval_ptr = NULL;
    4727             :         zend_fcall_info fci;
    4728             :         zend_fcall_info_cache fci_cache;
    4729             : 
    4730         747 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
    4731          14 :                 return;
    4732             :         }
    4733             : 
    4734         733 :         fci.retval_ptr_ptr = &retval_ptr;
    4735             : 
    4736         733 :         if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
    4737        2175 :                 COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
    4738             :         }
    4739             : 
    4740         730 :         if (fci.params) {
    4741         254 :                 efree(fci.params);
    4742             :         }
    4743             : }
    4744             : /* }}} */
    4745             : 
    4746             : /* {{{ proto mixed call_user_func_array(string function_name, array parameters)
    4747             :    Call a user function which is the first parameter with the arguments contained in array */
    4748         163 : PHP_FUNCTION(call_user_func_array)
    4749             : {
    4750         163 :         zval *params, *retval_ptr = NULL;
    4751             :         zend_fcall_info fci;
    4752             :         zend_fcall_info_cache fci_cache;
    4753             : 
    4754         163 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "fa/", &fci, &fci_cache, &params) == FAILURE) {
    4755          54 :                 return;
    4756             :         }
    4757             : 
    4758         109 :         zend_fcall_info_args(&fci, params TSRMLS_CC);
    4759         109 :         fci.retval_ptr_ptr = &retval_ptr;
    4760             : 
    4761         109 :         if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
    4762         315 :                 COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
    4763             :         }
    4764             : 
    4765         109 :         zend_fcall_info_args_clear(&fci, 1);
    4766             : }
    4767             : /* }}} */
    4768             : 
    4769             : /* {{{ proto mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...]) U
    4770             :    Call a user function which is the first parameter */
    4771          13 : PHP_FUNCTION(forward_static_call)
    4772             : {
    4773          13 :         zval *retval_ptr = NULL;
    4774             :         zend_fcall_info fci;
    4775             :         zend_fcall_info_cache fci_cache;
    4776             : 
    4777          13 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
    4778           0 :                 return;
    4779             :         }
    4780             : 
    4781          13 :         if (!EG(active_op_array)->scope) {
    4782           1 :                 zend_error(E_ERROR, "Cannot call forward_static_call() when no class scope is active");
    4783             :         }
    4784             : 
    4785          12 :         fci.retval_ptr_ptr = &retval_ptr;
    4786             : 
    4787          24 :         if (EG(called_scope) &&
    4788          12 :                 instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
    4789          11 :                         fci_cache.called_scope = EG(called_scope);
    4790             :         }
    4791             :         
    4792          12 :         if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
    4793          36 :                 COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
    4794             :         }
    4795             : 
    4796          12 :         if (fci.params) {
    4797           0 :                 efree(fci.params);
    4798             :         }
    4799             : }
    4800             : /* }}} */
    4801             : 
    4802             : /* {{{ proto mixed call_user_func_array(string function_name, array parameters) U
    4803             :    Call a user function which is the first parameter with the arguments contained in array */
    4804           0 : PHP_FUNCTION(forward_static_call_array)
    4805             : {
    4806           0 :         zval *params, *retval_ptr = NULL;
    4807             :         zend_fcall_info fci;
    4808             :         zend_fcall_info_cache fci_cache;
    4809             : 
    4810           0 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "fa/", &fci, &fci_cache, &params) == FAILURE) {
    4811           0 :                 return;
    4812             :         }
    4813             : 
    4814           0 :         zend_fcall_info_args(&fci, params TSRMLS_CC);
    4815           0 :         fci.retval_ptr_ptr = &retval_ptr;
    4816             : 
    4817           0 :         if (EG(called_scope) &&
    4818           0 :                 instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
    4819           0 :                         fci_cache.called_scope = EG(called_scope);
    4820             :         }
    4821             : 
    4822           0 :         if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
    4823           0 :                 COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
    4824             :         }
    4825             : 
    4826           0 :         zend_fcall_info_args_clear(&fci, 1);
    4827             : }
    4828             : /* }}} */
    4829             : 
    4830         146 : void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */
    4831             : {
    4832             :         int i;
    4833             : 
    4834         323 :         for (i = 0; i < shutdown_function_entry->arg_count; i++) {
    4835         178 :                 zval_ptr_dtor(&shutdown_function_entry->arguments[i]);
    4836             :         }
    4837         145 :         efree(shutdown_function_entry->arguments);
    4838         145 : }
    4839             : /* }}} */
    4840             : 
    4841           3 : void user_tick_function_dtor(user_tick_function_entry *tick_function_entry) /* {{{ */
    4842             : {
    4843             :         int i;
    4844             : 
    4845           6 :         for (i = 0; i < tick_function_entry->arg_count; i++) {
    4846           3 :                 zval_ptr_dtor(&tick_function_entry->arguments[i]);
    4847             :         }
    4848           3 :         efree(tick_function_entry->arguments);
    4849           3 : }
    4850             : /* }}} */
    4851             : 
    4852         143 : static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) /* {{{ */
    4853             : {
    4854             :         zval retval;
    4855             :         char *function_name;
    4856             : 
    4857         143 :         if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name TSRMLS_CC)) {
    4858           1 :                 php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name);
    4859           1 :                 if (function_name) {
    4860           1 :                         efree(function_name);
    4861             :                 }
    4862           1 :                 return 0;
    4863             :         }
    4864         142 :         if (function_name) {
    4865         142 :                 efree(function_name);
    4866             :         }
    4867             : 
    4868         284 :         if (call_user_function(EG(function_table), NULL,
    4869             :                                 shutdown_function_entry->arguments[0],
    4870             :                                 &retval,
    4871         142 :                                 shutdown_function_entry->arg_count - 1,
    4872             :                                 shutdown_function_entry->arguments + 1
    4873             :                                 TSRMLS_CC ) == SUCCESS)
    4874             :         {
    4875             :                 zval_dtor(&retval);
    4876             :         }
    4877         140 :         return 0;
    4878             : }
    4879             : /* }}} */
    4880             : 
    4881          21 : static void user_tick_function_call(user_tick_function_entry *tick_fe TSRMLS_DC) /* {{{ */
    4882             : {
    4883             :         zval retval;
    4884          21 :         zval *function = tick_fe->arguments[0];
    4885             : 
    4886             :         /* Prevent reentrant calls to the same user ticks function */
    4887          21 :         if (! tick_fe->calling) {
    4888          12 :                 tick_fe->calling = 1;
    4889             : 
    4890          24 :                 if (call_user_function( EG(function_table), NULL,
    4891             :                                                                 function,
    4892             :                                                                 &retval,
    4893          12 :                                                                 tick_fe->arg_count - 1,
    4894             :                                                                 tick_fe->arguments + 1
    4895             :                                                                 TSRMLS_CC) == SUCCESS) {
    4896             :                         zval_dtor(&retval);
    4897             : 
    4898             :                 } else {
    4899             :                         zval **obj, **method;
    4900             : 
    4901           0 :                         if (Z_TYPE_P(function) == IS_STRING) {
    4902           0 :                                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", Z_STRVAL_P(function));
    4903           0 :                         } else if (     Z_TYPE_P(function) == IS_ARRAY
    4904           0 :                                                 && zend_hash_index_find(Z_ARRVAL_P(function), 0, (void **) &obj) == SUCCESS
    4905           0 :                                                 && zend_hash_index_find(Z_ARRVAL_P(function), 1, (void **) &method) == SUCCESS
    4906           0 :                                                 && Z_TYPE_PP(obj) == IS_OBJECT
    4907           0 :                                                 && Z_TYPE_PP(method) == IS_STRING) {
    4908           0 :                                 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));
    4909             :                         } else {
    4910           0 :                                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call tick function");
    4911             :                         }
    4912             :                 }
    4913             : 
    4914          12 :                 tick_fe->calling = 0;
    4915             :         }
    4916          21 : }
    4917             : /* }}} */
    4918             : 
    4919          24 : static void run_user_tick_functions(int tick_count) /* {{{ */
    4920             : {
    4921             :         TSRMLS_FETCH();
    4922             : 
    4923          24 :         zend_llist_apply(BG(user_tick_functions), (llist_apply_func_t) user_tick_function_call TSRMLS_CC);
    4924          24 : }
    4925             : /* }}} */
    4926             : 
    4927           4 : static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_tick_function_entry * tick_fe2) /* {{{ */
    4928             : {
    4929           4 :         zval *func1 = tick_fe1->arguments[0];
    4930           4 :         zval *func2 = tick_fe2->arguments[0];
    4931             :         int ret;
    4932             :         TSRMLS_FETCH();
    4933             : 
    4934           7 :         if (Z_TYPE_P(func1) == IS_STRING && Z_TYPE_P(func2) == IS_STRING) {
    4935           3 :                 ret = (zend_binary_zval_strcmp(func1, func2) == 0);
    4936           1 :         } else if (Z_TYPE_P(func1) == IS_ARRAY && Z_TYPE_P(func2) == IS_ARRAY) {
    4937             :                 zval result;
    4938           0 :                 zend_compare_arrays(&result, func1, func2 TSRMLS_CC);
    4939           0 :                 ret = (Z_LVAL(result) == 0);
    4940           2 :         } else if (Z_TYPE_P(func1) == IS_OBJECT && Z_TYPE_P(func2) == IS_OBJECT) {
    4941             :                 zval result;
    4942           1 :                 zend_compare_objects(&result, func1, func2 TSRMLS_CC);
    4943           1 :                 ret = (Z_LVAL(result) == 0);
    4944             :         } else {
    4945           0 :                 ret = 0;
    4946             :         }
    4947             : 
    4948           4 :         if (ret && tick_fe1->calling) {
    4949           3 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to delete tick function executed at the moment");
    4950           3 :                 return 0;
    4951             :         }
    4952           1 :         return ret;
    4953             : }
    4954             : /* }}} */
    4955             : 
    4956       21257 : void php_call_shutdown_functions(TSRMLS_D) /* {{{ */
    4957             : {
    4958       21257 :         if (BG(user_shutdown_function_names)) {
    4959         119 :                 zend_try {
    4960         119 :                         zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC);
    4961             :                 }
    4962         119 :                 zend_end_try();
    4963         119 :                 php_free_shutdown_functions(TSRMLS_C);
    4964             :         }
    4965       21257 : }
    4966             : /* }}} */
    4967             : 
    4968       21376 : void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
    4969             : {
    4970       21376 :         if (BG(user_shutdown_function_names))
    4971         119 :                 zend_try {
    4972         119 :                         zend_hash_destroy(BG(user_shutdown_function_names));
    4973         118 :                         FREE_HASHTABLE(BG(user_shutdown_function_names));
    4974         118 :                         BG(user_shutdown_function_names) = NULL;
    4975           1 :                 } zend_catch {
    4976             :                         /* maybe shutdown method call exit, we just ignore it */
    4977           1 :                         FREE_HASHTABLE(BG(user_shutdown_function_names));
    4978           1 :                         BG(user_shutdown_function_names) = NULL;
    4979         119 :                 } zend_end_try();
    4980       21376 : }
    4981             : /* }}} */
    4982             : 
    4983             : /* {{{ proto void register_shutdown_function(callback function) U
    4984             :    Register a user-level function to be called on request termination */
    4985         114 : PHP_FUNCTION(register_shutdown_function)
    4986             : {
    4987             :         php_shutdown_function_entry shutdown_function_entry;
    4988         114 :         char *callback_name = NULL;
    4989             :         int i;
    4990             : 
    4991         114 :         shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
    4992             : 
    4993         114 :         if (shutdown_function_entry.arg_count < 1) {
    4994           0 :                 WRONG_PARAM_COUNT;
    4995             :         }
    4996             : 
    4997         114 :         shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
    4998             : 
    4999         114 :         if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
    5000           0 :                 efree(shutdown_function_entry.arguments);
    5001           0 :                 RETURN_FALSE;
    5002             :         }
    5003             : 
    5004             :         /* Prevent entering of anything but valid callback (syntax check only!) */
    5005         114 :         if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &callback_name TSRMLS_CC)) {
    5006           7 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", callback_name);
    5007           7 :                 efree(shutdown_function_entry.arguments);
    5008           7 :                 RETVAL_FALSE;
    5009             :         } else {
    5010         106 :                 if (!BG(user_shutdown_function_names)) {
    5011         100 :                         ALLOC_HASHTABLE(BG(user_shutdown_function_names));
    5012         100 :                         zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
    5013             :                 }
    5014             : 
    5015         244 :                 for (i = 0; i < shutdown_function_entry.arg_count; i++) {
    5016         138 :                         Z_ADDREF_P(shutdown_function_entry.arguments[i]);
    5017             :                 }
    5018         106 :                 zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
    5019             :         }
    5020         113 :         if (callback_name) {
    5021         113 :                 efree(callback_name);
    5022             :         }
    5023             : }
    5024             : /* }}} */
    5025             : 
    5026          21 : PHPAPI zend_bool register_user_shutdown_function(char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) /* {{{ */
    5027             : {
    5028          21 :         if (!BG(user_shutdown_function_names)) {
    5029          19 :                 ALLOC_HASHTABLE(BG(user_shutdown_function_names));
    5030          19 :                 zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
    5031             :         }
    5032             : 
    5033          21 :         return zend_hash_update(BG(user_shutdown_function_names), function_name, function_len, shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL) != FAILURE;
    5034             : }
    5035             : /* }}} */
    5036             : 
    5037          71 : PHPAPI zend_bool remove_user_shutdown_function(char *function_name, size_t function_len TSRMLS_DC) /* {{{ */
    5038             : {
    5039          71 :         if (BG(user_shutdown_function_names)) {
    5040           0 :                 return zend_hash_del_key_or_index(BG(user_shutdown_function_names), function_name, function_len, 0, HASH_DEL_KEY) != FAILURE;
    5041             :         }
    5042             : 
    5043          71 :         return 0;
    5044             : }
    5045             : /* }}} */
    5046             : 
    5047          19 : PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry TSRMLS_DC) /* {{{ */
    5048             : {
    5049          19 :         if (!BG(user_shutdown_function_names)) {
    5050           0 :                 ALLOC_HASHTABLE(BG(user_shutdown_function_names));
    5051           0 :                 zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);
    5052             :         }
    5053             : 
    5054          19 :         return zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL) != FAILURE;
    5055             : }
    5056             : /* }}} */
    5057             : 
    5058          36 : ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini) /* {{{ */
    5059             : {
    5060          36 :         syntax_highlighter_ini->highlight_comment = INI_STR("highlight.comment");
    5061          36 :         syntax_highlighter_ini->highlight_default = INI_STR("highlight.default");
    5062          36 :         syntax_highlighter_ini->highlight_html    = INI_STR("highlight.html");
    5063          36 :         syntax_highlighter_ini->highlight_keyword = INI_STR("highlight.keyword");
    5064          36 :         syntax_highlighter_ini->highlight_string  = INI_STR("highlight.string");
    5065          36 : }
    5066             : /* }}} */
    5067             : 
    5068             : /* {{{ proto bool highlight_file(string file_name [, bool return] )
    5069             :    Syntax highlight a source file */
    5070           9 : PHP_FUNCTION(highlight_file)
    5071             : {
    5072             :         char *filename;
    5073             :         int filename_len, ret;
    5074             :         zend_syntax_highlighter_ini syntax_highlighter_ini;
    5075           9 :         zend_bool i = 0;
    5076             : 
    5077           9 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|b", &filename, &filename_len, &i) == FAILURE) {
    5078           1 :                 RETURN_FALSE;
    5079             :         }
    5080             : 
    5081           8 :         if (php_check_open_basedir(filename TSRMLS_CC)) {
    5082           0 :                 RETURN_FALSE;
    5083             :         }
    5084             : 
    5085           8 :         if (i) {
    5086           2 :                 php_output_start_default(TSRMLS_C);
    5087             :         }
    5088             : 
    5089           8 :         php_get_highlight_struct(&syntax_highlighter_ini);
    5090             : 
    5091           8 :         ret = highlight_file(filename, &syntax_highlighter_ini TSRMLS_CC);
    5092             : 
    5093           8 :         if (ret == FAILURE) {
    5094           2 :                 if (i) {
    5095           1 :                         php_output_end(TSRMLS_C);
    5096             :                 }
    5097           2 :                 RETURN_FALSE;
    5098             :         }
    5099             : 
    5100           6 :         if (i) {
    5101           1 :                 php_output_get_contents(return_value TSRMLS_CC);
    5102           1 :                 php_output_discard(TSRMLS_C);
    5103             :         } else {
    5104           5 :                 RETURN_TRUE;
    5105             :         }
    5106             : }
    5107             : /* }}} */
    5108             : 
    5109             : /* {{{ proto string php_strip_whitespace(string file_name)
    5110             :    Return source with stripped comments and whitespace */
    5111           8 : PHP_FUNCTION(php_strip_whitespace)
    5112             : {
    5113             :         char *filename;
    5114             :         int filename_len;
    5115             :         zend_lex_state original_lex_state;
    5116           8 :         zend_file_handle file_handle = {0};
    5117             : 
    5118           8 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
    5119           1 :                 RETURN_FALSE;
    5120             :         }
    5121             : 
    5122           7 :         php_output_start_default(TSRMLS_C);
    5123             : 
    5124           7 :         file_handle.type = ZEND_HANDLE_FILENAME;
    5125           7 :         file_handle.filename = filename;
    5126           7 :         file_handle.free_filename = 0;
    5127           7 :         file_handle.opened_path = NULL;
    5128           7 :         zend_save_lexical_state(&original_lex_state TSRMLS_CC);
    5129           7 :         if (open_file_for_scanning(&file_handle TSRMLS_CC) == FAILURE) {
    5130           2 :                 zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
    5131           2 :                 php_output_end(TSRMLS_C);
    5132           2 :                 RETURN_EMPTY_STRING();
    5133             :         }
    5134             : 
    5135           5 :         zend_strip(TSRMLS_C);
    5136             : 
    5137           5 :         zend_destroy_file_handle(&file_handle TSRMLS_CC);
    5138           5 :         zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
    5139             : 
    5140           5 :         php_output_get_contents(return_value TSRMLS_CC);
    5141           5 :         php_output_discard(TSRMLS_C);
    5142             : }
    5143             : /* }}} */
    5144             : 
    5145             : /* {{{ proto bool highlight_string(string string [, bool return] )
    5146             :    Syntax highlight a string or optionally return it */
    5147          14 : PHP_FUNCTION(highlight_string)
    5148             : {
    5149             :         zval **expr;
    5150             :         zend_syntax_highlighter_ini syntax_highlighter_ini;
    5151             :         char *hicompiled_string_description;
    5152          14 :         zend_bool i = 0;
    5153          14 :         int old_error_reporting = EG(error_reporting);
    5154             : 
    5155          14 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|b", &expr, &i) == FAILURE) {
    5156           0 :                 RETURN_FALSE;
    5157             :         }
    5158          14 :         convert_to_string_ex(expr);
    5159             : 
    5160          14 :         if (i) {
    5161           7 :                 php_output_start_default(TSRMLS_C);
    5162             :         }
    5163             : 
    5164          14 :         EG(error_reporting) = E_ERROR;
    5165             : 
    5166          14 :         php_get_highlight_struct(&syntax_highlighter_ini);
    5167             : 
    5168          14 :         hicompiled_string_description = zend_make_compiled_string_description("highlighted code" TSRMLS_CC);
    5169             : 
    5170          14 :         if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description TSRMLS_CC) == FAILURE) {
    5171           0 :                 efree(hicompiled_string_description);
    5172           0 :                 EG(error_reporting) = old_error_reporting;
    5173           0 :                 if (i) {
    5174           0 :                         php_output_end(TSRMLS_C);
    5175             :                 }
    5176           0 :                 RETURN_FALSE;
    5177             :         }
    5178          14 :         efree(hicompiled_string_description);
    5179             : 
    5180          14 :         EG(error_reporting) = old_error_reporting;
    5181             : 
    5182          14 :         if (i) {
    5183           7 :                 php_output_get_contents(return_value TSRMLS_CC);
    5184           7 :                 php_output_discard(TSRMLS_C);
    5185             :         } else {
    5186           7 :                 RETURN_TRUE;
    5187             :         }
    5188             : }
    5189             : /* }}} */
    5190             : 
    5191             : /* {{{ proto string ini_get(string varname)
    5192             :    Get a configuration option */
    5193         537 : PHP_FUNCTION(ini_get)
    5194             : {
    5195             :         char *varname, *str;
    5196             :         int varname_len;
    5197             : 
    5198         537 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
    5199           0 :                 return;
    5200             :         }
    5201             : 
    5202         537 :         str = zend_ini_string(varname, varname_len + 1, 0);
    5203             : 
    5204         537 :         if (!str) {
    5205           8 :                 RETURN_FALSE;
    5206             :         }
    5207             : 
    5208         529 :         RETURN_STRING(str, 1);
    5209             : }
    5210             : /* }}} */
    5211             : 
    5212        3157 : static int php_ini_get_option(zend_ini_entry *ini_entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
    5213             : {
    5214        3157 :         zval *ini_array = va_arg(args, zval *);
    5215        3157 :         int module_number = va_arg(args, int);
    5216        3157 :         int details = va_arg(args, int);
    5217             :         zval *option;
    5218             : 
    5219        3157 :         if (module_number != 0 && ini_entry->module_number != module_number) {
    5220        1144 :                 return 0;
    5221             :         }
    5222             : 
    5223        4026 :         if (hash_key->nKeyLength == 0 ||
    5224        2013 :                 hash_key->arKey[0] != 0
    5225             :         ) {
    5226        2013 :                 if (details) {
    5227        2011 :                         MAKE_STD_ZVAL(option);
    5228        2011 :                         array_init(option);
    5229             : 
    5230        2011 :                         if (ini_entry->orig_value) {
    5231           0 :                                 add_assoc_stringl(option, "global_value", ini_entry->orig_value, ini_entry->orig_value_length, 1);
    5232        2011 :                         } else if (ini_entry->value) {
    5233        1668 :                                 add_assoc_stringl(option, "global_value", ini_entry->value, ini_entry->value_length, 1);
    5234             :                         } else {
    5235         343 :                                 add_assoc_null(option, "global_value");
    5236             :                         }
    5237             : 
    5238        2011 :                         if (ini_entry->value) {
    5239        1668 :                                 add_assoc_stringl(option, "local_value", ini_entry->value, ini_entry->value_length, 1);
    5240             :                         } else {
    5241         343 :                                 add_assoc_null(option, "local_value");
    5242             :                         }
    5243             : 
    5244        2011 :                         add_assoc_long(option, "access", ini_entry->modifiable);
    5245             : 
    5246        2011 :                         add_assoc_zval_ex(ini_array, ini_entry->name, ini_entry->name_length, option);
    5247             :                 } else {
    5248           2 :                         if (ini_entry->value) {
    5249           2 :                                 add_assoc_stringl(ini_array, ini_entry->name, ini_entry->value, ini_entry->value_length, 1);
    5250             :                         } else {
    5251           0 :                                 add_assoc_null(ini_array, ini_entry->name);
    5252             :                         }
    5253             :                 }
    5254             :         }
    5255        2013 :         return 0;
    5256             : }
    5257             : /* }}} */
    5258             : 
    5259             : /* {{{ proto array ini_get_all([string extension[, bool details = true]])
    5260             :    Get all configuration options */
    5261          14 : PHP_FUNCTION(ini_get_all)
    5262             : {
    5263          14 :         char *extname = NULL;
    5264          14 :         int extname_len = 0, extnumber = 0;
    5265             :         zend_module_entry *module;
    5266          14 :         zend_bool details = 1;
    5267             : 
    5268          14 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &extname, &extname_len, &details) == FAILURE) {
    5269           0 :                 return;
    5270             :         }
    5271             : 
    5272          14 :         zend_ini_sort_entries(TSRMLS_C);
    5273             : 
    5274          14 :         if (extname) {
    5275           7 :                 if (zend_hash_find(&module_registry, extname, extname_len+1, (void **) &module) == FAILURE) {
    5276           3 :                         php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find extension '%s'", extname);
    5277           3 :                         RETURN_FALSE;
    5278             :                 }
    5279           4 :                 extnumber = module->module_number;
    5280             :         }
    5281             : 
    5282          11 :         array_init(return_value);
    5283          11 :         zend_hash_apply_with_arguments(EG(ini_directives) TSRMLS_CC, (apply_func_args_t) php_ini_get_option, 2, return_value, extnumber, details);
    5284             : }
    5285             : /* }}} */
    5286             : 
    5287       15612 : static int php_ini_check_path(char *option_name, int option_len, char *new_option_name, int new_option_len) /* {{{ */
    5288             : {
    5289       15612 :         if (option_len != (new_option_len - 1)) {
    5290       14326 :                 return 0;
    5291             :         }
    5292             : 
    5293        1286 :         return !strncmp(option_name, new_option_name, option_len);
    5294             : }
    5295             : /* }}} */
    5296             : 
    5297             : /* {{{ proto string ini_set(string varname, string newvalue)
    5298             :    Set a configuration option, returns false on error and the old value of the configuration option on success */
    5299        2607 : PHP_FUNCTION(ini_set)
    5300             : {
    5301             :         char *varname, *new_value;
    5302             :         int varname_len, new_value_len;
    5303             :         char *old_value;
    5304             : 
    5305        2607 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &varname, &varname_len, &new_value, &new_value_len) == FAILURE) {
    5306           0 :                 return;
    5307             :         }
    5308             : 
    5309        2607 :         old_value = zend_ini_string(varname, varname_len + 1, 0);
    5310             : 
    5311             :         /* copy to return here, because alter might free it! */
    5312        2607 :         if (old_value) {
    5313        2606 :                 RETVAL_STRING(old_value, 1);
    5314             :         } else {
    5315           1 :                 RETVAL_FALSE;
    5316             :         }
    5317             : 
    5318             : #define _CHECK_PATH(var, var_len, ini) php_ini_check_path(var, var_len, ini, sizeof(ini))
    5319             :         /* open basedir check */
    5320        2607 :         if (PG(open_basedir)) {
    5321       15612 :                 if (_CHECK_PATH(varname, varname_len, "error_log") ||
    5322        2601 :                         _CHECK_PATH(varname, varname_len, "java.class.path") ||
    5323        2601 :                         _CHECK_PATH(varname, varname_len, "java.home") ||
    5324        2601 :                         _CHECK_PATH(varname, varname_len, "mail.log") ||
    5325        2601 :                         _CHECK_PATH(varname, varname_len, "java.library.path") ||
    5326        2601 :                         _CHECK_PATH(varname, varname_len, "vpopmail.directory")) {
    5327           6 :                         if (php_check_open_basedir(new_value TSRMLS_CC)) {
    5328             :                                 zval_dtor(return_value);
    5329           3 :                                 RETURN_FALSE;
    5330             :                         }
    5331             :                 }
    5332             :         }
    5333             : 
    5334        2604 :         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) {
    5335             :                 zval_dtor(return_value);
    5336          21 :                 RETURN_FALSE;
    5337             :         }
    5338             : }
    5339             : /* }}} */
    5340             : 
    5341             : /* {{{ proto void ini_restore(string varname)
    5342             :    Restore the value of a configuration option specified by varname */
    5343           3 : PHP_FUNCTION(ini_restore)
    5344             : {
    5345             :         char *varname;
    5346             :         int varname_len;
    5347             : 
    5348           3 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &varname, &varname_len) == FAILURE) {
    5349           0 :                 return;
    5350             :         }
    5351             : 
    5352           3 :         zend_restore_ini_entry(varname, varname_len+1, PHP_INI_STAGE_RUNTIME);
    5353             : }
    5354             : /* }}} */
    5355             : 
    5356             : /* {{{ proto string set_include_path(string new_include_path)
    5357             :    Sets the include_path configuration option */
    5358          66 : PHP_FUNCTION(set_include_path)
    5359             : {
    5360             :         char *new_value;
    5361             :         int new_value_len;
    5362             :         char *old_value;
    5363             : 
    5364          66 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &new_value, &new_value_len) == FAILURE) {
    5365           2 :                 return;
    5366             :         }
    5367             : 
    5368          64 :         old_value = zend_ini_string("include_path", sizeof("include_path"), 0);
    5369             :         /* copy to return here, because alter might free it! */
    5370          64 :         if (old_value) {
    5371          64 :                 RETVAL_STRING(old_value, 1);
    5372             :         } else {
    5373           0 :                 RETVAL_FALSE;
    5374             :         }
    5375             : 
    5376          64 :         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) {
    5377             :                 zval_dtor(return_value);
    5378           3 :                 RETURN_FALSE;
    5379             :         }
    5380             : }
    5381             : /* }}} */
    5382             : 
    5383             : /* {{{ proto string get_include_path()
    5384             :    Get the current include_path configuration option */
    5385          18 : PHP_FUNCTION(get_include_path)
    5386             : {
    5387             :         char *str;
    5388             : 
    5389          18 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
    5390           2 :                 return;
    5391             :         }
    5392             : 
    5393          16 :         str = zend_ini_string("include_path", sizeof("include_path"), 0);
    5394             : 
    5395          16 :         if (str == NULL) {
    5396           0 :                 RETURN_FALSE;
    5397             :         }
    5398             : 
    5399          16 :         RETURN_STRING(str, 1);
    5400             : }
    5401             : /* }}} */
    5402             : 
    5403             : /* {{{ proto void restore_include_path()
    5404             :    Restore the value of the include_path configuration option */
    5405          24 : PHP_FUNCTION(restore_include_path)
    5406             : {
    5407          24 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
    5408           1 :                 return;
    5409             :         }
    5410          23 :         zend_restore_ini_entry("include_path", sizeof("include_path"), PHP_INI_STAGE_RUNTIME);
    5411             : }
    5412             : /* }}} */
    5413             : 
    5414             : /* {{{ proto mixed print_r(mixed var [, bool return])
    5415             :    Prints out or returns information about the specified variable */
    5416        1058 : PHP_FUNCTION(print_r)
    5417             : {
    5418             :         zval *var;
    5419        1058 :         zend_bool do_return = 0;
    5420             : 
    5421        1058 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &do_return) == FAILURE) {
    5422           2 :                 RETURN_FALSE;
    5423             :         }
    5424             : 
    5425        1056 :         if (do_return) {
    5426         181 :                 php_output_start_default(TSRMLS_C);
    5427             :         }
    5428             : 
    5429        1055 :         zend_print_zval_r(var, 0 TSRMLS_CC);
    5430             : 
    5431        1055 :         if (do_return) {
    5432         180 :                 php_output_get_contents(return_value TSRMLS_CC);
    5433         180 :                 php_output_discard(TSRMLS_C);
    5434             :         } else {
    5435         875 :                 RETURN_TRUE;
    5436             :         }
    5437             : }
    5438             : /* }}} */
    5439             : 
    5440             : /* {{{ proto int connection_aborted(void)
    5441             :    Returns true if client disconnected */
    5442           0 : PHP_FUNCTION(connection_aborted)
    5443             : {
    5444           0 :         RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED);
    5445             : }
    5446             : /* }}} */
    5447             : 
    5448             : /* {{{ proto int connection_status(void)
    5449             :    Returns the connection status bitfield */
    5450           0 : PHP_FUNCTION(connection_status)
    5451             : {
    5452           0 :         RETURN_LONG(PG(connection_status));
    5453             : }
    5454             : /* }}} */
    5455             : 
    5456             : /* {{{ proto int ignore_user_abort([string value])
    5457             :    Set whether we want to ignore a user abort event or not */
    5458           0 : PHP_FUNCTION(ignore_user_abort)
    5459             : {
    5460           0 :         char *arg = NULL;
    5461           0 :         int arg_len = 0;
    5462             :         int old_setting;
    5463             : 
    5464           0 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &arg, &arg_len) == FAILURE) {
    5465           0 :                 return;
    5466             :         }
    5467             : 
    5468           0 :         old_setting = PG(ignore_user_abort);
    5469             : 
    5470           0 :         if (arg) {
    5471           0 :                 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);
    5472             :         }
    5473             : 
    5474           0 :         RETURN_LONG(old_setting);
    5475             : }
    5476             : /* }}} */
    5477             : 
    5478             : #if HAVE_GETSERVBYNAME
    5479             : /* {{{ proto int getservbyname(string service, string protocol)
    5480             :    Returns port associated with service. Protocol must be "tcp" or "udp" */
    5481          71 : PHP_FUNCTION(getservbyname)
    5482             : {
    5483             :         char *name, *proto;
    5484             :         int name_len, proto_len;
    5485             :         struct servent *serv;
    5486             : 
    5487          71 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &proto, &proto_len) == FAILURE) {
    5488          12 :                 return;
    5489             :         }
    5490             : 
    5491             : 
    5492             : /* empty string behaves like NULL on windows implementation of 
    5493             :    getservbyname. Let be portable instead. */
    5494             : #ifdef PHP_WIN32
    5495             :         if (proto_len == 0) {
    5496             :                 RETURN_FALSE;
    5497             :         }
    5498             : #endif
    5499             : 
    5500          59 :         serv = getservbyname(name, proto);
    5501             : 
    5502          59 :         if (serv == NULL) {
    5503          48 :                 RETURN_FALSE;
    5504             :         }
    5505             : 
    5506          11 :         RETURN_LONG(ntohs(serv->s_port));
    5507             : }
    5508             : /* }}} */
    5509             : #endif
    5510             : 
    5511             : #if HAVE_GETSERVBYPORT
    5512             : /* {{{ proto string getservbyport(int port, string protocol)
    5513             :    Returns service name associated with port. Protocol must be "tcp" or "udp" */
    5514          12 : PHP_FUNCTION(getservbyport)
    5515             : {
    5516             :         char *proto;
    5517             :         int proto_len;
    5518             :         long port;
    5519             :         struct servent *serv;
    5520             : 
    5521          12 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &port, &proto, &proto_len) == FAILURE) {
    5522           6 :                 return;
    5523             :         }
    5524             : 
    5525           6 :         serv = getservbyport(htons((unsigned short) port), proto);
    5526             : 
    5527           6 :         if (serv == NULL) {
    5528           4 :                 RETURN_FALSE;
    5529             :         }
    5530             : 
    5531           2 :         RETURN_STRING(serv->s_name, 1);
    5532             : }
    5533             : /* }}} */
    5534             : #endif
    5535             : 
    5536             : #if HAVE_GETPROTOBYNAME
    5537             : /* {{{ proto int getprotobyname(string name)
    5538             :    Returns protocol number associated with name as per /etc/protocols */
    5539           9 : PHP_FUNCTION(getprotobyname)
    5540             : {
    5541             :         char *name;
    5542             :         int name_len;
    5543             :         struct protoent *ent;
    5544             : 
    5545           9 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
    5546           0 :                 return;
    5547             :         }
    5548             : 
    5549           9 :         ent = getprotobyname(name);
    5550             : 
    5551           9 :         if (ent == NULL) {
    5552           0 :                 RETURN_FALSE;
    5553             :         }
    5554             : 
    5555           9 :         RETURN_LONG(ent->p_proto);
    5556             : }
    5557             : /* }}} */
    5558             : #endif
    5559             : 
    5560             : #if HAVE_GETPROTOBYNUMBER
    5561             : /* {{{ proto string getprotobynumber(int proto)
    5562             :    Returns protocol name associated with protocol number proto */
    5563           0 : PHP_FUNCTION(getprotobynumber)
    5564             : {
    5565             :         long proto;
    5566             :         struct protoent *ent;
    5567             : 
    5568           0 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &proto) == FAILURE) {
    5569           0 :                 return;
    5570             :         }
    5571             : 
    5572           0 :         ent = getprotobynumber(proto);
    5573             : 
    5574           0 :         if (ent == NULL) {
    5575           0 :                 RETURN_FALSE;
    5576             :         }
    5577             : 
    5578           0 :         RETURN_STRING(ent->p_name, 1);
    5579             : }
    5580             : /* }}} */
    5581             : #endif
    5582             : 
    5583             : /* {{{ proto bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])
    5584             :    Registers a tick callback function */
    5585           3 : PHP_FUNCTION(register_tick_function)
    5586             : {
    5587             :         user_tick_function_entry tick_fe;
    5588             :         int i;
    5589           3 :         char *function_name = NULL;
    5590             : 
    5591           3 :         tick_fe.calling = 0;
    5592           3 :         tick_fe.arg_count = ZEND_NUM_ARGS();
    5593             : 
    5594           3 :         if (tick_fe.arg_count < 1) {
    5595           0 :                 WRONG_PARAM_COUNT;
    5596             :         }
    5597             : 
    5598           3 :         tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
    5599             : 
    5600           3 :         if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
    5601           0 :                 efree(tick_fe.arguments);
    5602           0 :                 RETURN_FALSE;
    5603             :         }
    5604             : 
    5605           3 :         if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name TSRMLS_CC)) {
    5606           0 :                 efree(tick_fe.arguments);
    5607           0 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid tick callback '%s' passed", function_name);
    5608           0 :                 efree(function_name);
    5609           0 :                 RETURN_FALSE;
    5610           3 :         } else if (function_name) {
    5611           3 :                 efree(function_name);
    5612             :         }
    5613             : 
    5614           3 :         if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY && Z_TYPE_P(tick_fe.arguments[0]) != IS_OBJECT) {
    5615           1 :                 convert_to_string_ex(&tick_fe.arguments[0]);
    5616             :         }
    5617             : 
    5618           3 :         if (!BG(user_tick_functions)) {
    5619           3 :                 BG(user_tick_functions) = (zend_llist *) emalloc(sizeof(zend_llist));
    5620           3 :                 zend_llist_init(BG(user_tick_functions),
    5621             :                                                 sizeof(user_tick_function_entry),
    5622             :                                                 (llist_dtor_func_t) user_tick_function_dtor, 0);
    5623           3 :                 php_add_tick_function(run_user_tick_functions TSRMLS_CC);
    5624             :         }
    5625             : 
    5626           6 :         for (i = 0; i < tick_fe.arg_count; i++) {
    5627           3 :                 Z_ADDREF_P(tick_fe.arguments[i]);
    5628             :         }
    5629             : 
    5630           3 :         zend_llist_add_element(BG(user_tick_functions), &tick_fe);
    5631             : 
    5632           3 :         RETURN_TRUE;
    5633             : }
    5634             : /* }}} */
    5635             : 
    5636             : /* {{{ proto void unregister_tick_function(string function_name)
    5637             :    Unregisters a tick callback function */
    5638           4 : PHP_FUNCTION(unregister_tick_function)
    5639             : {
    5640             :         zval *function;
    5641             :         user_tick_function_entry tick_fe;
    5642             : 
    5643           4 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &function) == FAILURE) {
    5644           0 :                 return;
    5645             :         }
    5646             : 
    5647           4 :         if (!BG(user_tick_functions)) {
    5648           0 :                 return;
    5649             :         }
    5650             : 
    5651           4 :         if (Z_TYPE_P(function) != IS_ARRAY && Z_TYPE_P(function) != IS_OBJECT) {
    5652           3 :                 convert_to_string(function);
    5653             :         }
    5654             : 
    5655           4 :         tick_fe.arguments = (zval **) emalloc(sizeof(zval *));
    5656           4 :         tick_fe.arguments[0] = function;
    5657           4 :         tick_fe.arg_count = 1;
    5658           4 :         zend_llist_del_element(BG(user_tick_functions), &tick_fe, (int (*)(void *, void *)) user_tick_function_compare);
    5659           4 :         efree(tick_fe.arguments);
    5660             : }
    5661             : /* }}} */
    5662             : 
    5663             : /* {{{ proto bool is_uploaded_file(string path)
    5664             :    Check if file was created by rfc1867 upload */
    5665          14 : PHP_FUNCTION(is_uploaded_file)
    5666             : {
    5667             :         char *path;
    5668             :         int path_len;
    5669             : 
    5670          14 :         if (!SG(rfc1867_uploaded_files)) {
    5671           0 :                 RETURN_FALSE;
    5672             :         }
    5673             : 
    5674          14 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) {
    5675           2 :                 return;
    5676             :         }
    5677             : 
    5678          12 :         if (zend_hash_exists(SG(rfc1867_uploaded_files), path, path_len + 1)) {
    5679           9 :                 RETURN_TRUE;
    5680             :         } else {
    5681           3 :                 RETURN_FALSE;
    5682             :         }
    5683             : }
    5684             : /* }}} */
    5685             : 
    5686             : /* {{{ proto bool move_uploaded_file(string path, string new_path)
    5687             :    Move a file if and only if it was created by an upload */
    5688           6 : PHP_FUNCTION(move_uploaded_file)
    5689             : {
    5690             :         char *path, *new_path;
    5691             :         int path_len, new_path_len;
    5692           6 :         zend_bool successful = 0;
    5693             : 
    5694             : #ifndef PHP_WIN32
    5695             :         int oldmask; int ret;
    5696             : #endif
    5697             : 
    5698           6 :         if (!SG(rfc1867_uploaded_files)) {
    5699           0 :                 RETURN_FALSE;
    5700             :         }
    5701             : 
    5702           6 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &path, &path_len, &new_path, &new_path_len) == FAILURE) {
    5703           2 :                 return;
    5704             :         }
    5705             : 
    5706           4 :         if (!zend_hash_exists(SG(rfc1867_uploaded_files), path, path_len + 1)) {
    5707           2 :                 RETURN_FALSE;
    5708             :         }
    5709             : 
    5710           2 :         if (php_check_open_basedir(new_path TSRMLS_CC)) {
    5711           0 :                 RETURN_FALSE;
    5712             :         }
    5713             : 
    5714           2 :         if (VCWD_RENAME(path, new_path) == 0) {
    5715           2 :                 successful = 1;
    5716             : #ifndef PHP_WIN32
    5717           2 :                 oldmask = umask(077);
    5718           2 :                 umask(oldmask);
    5719             : 
    5720           2 :                 ret = VCWD_CHMOD(new_path, 0666 & ~oldmask);
    5721             : 
    5722           2 :                 if (ret == -1) {
    5723           0 :                         php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
    5724             :                 }
    5725             : #endif
    5726           0 :         } else if (php_copy_file_ex(path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) {
    5727           0 :                 VCWD_UNLINK(path);
    5728           0 :                 successful = 1;
    5729             :         }
    5730             : 
    5731           2 :         if (successful) {
    5732           2 :                 zend_hash_del(SG(rfc1867_uploaded_files), path, path_len + 1);
    5733             :         } else {
    5734           0 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to move '%s' to '%s'", path, new_path);
    5735             :         }
    5736             : 
    5737           2 :         RETURN_BOOL(successful);
    5738             : }
    5739             : /* }}} */
    5740             : 
    5741             : /* {{{ php_simple_ini_parser_cb
    5742             :  */
    5743         692 : static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_type, zval *arr TSRMLS_DC)
    5744             : {
    5745             :         zval *element;
    5746             : 
    5747         692 :         switch (callback_type) {
    5748             : 
    5749             :                 case ZEND_INI_PARSER_ENTRY:
    5750         637 :                         if (!arg2) {
    5751             :                                 /* bare string - nothing to do */
    5752           0 :                                 break;
    5753             :                         }
    5754         637 :                         ALLOC_ZVAL(element);
    5755        1911 :                         MAKE_COPY_ZVAL(&arg2, element);
    5756         637 :                         zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &element, sizeof(zval *), NULL);
    5757         637 :                         break;
    5758             : 
    5759             :                 case ZEND_INI_PARSER_POP_ENTRY:
    5760             :                 {
    5761             :                         zval *hash, **find_hash;
    5762             : 
    5763          21 :                         if (!arg2) {
    5764             :                                 /* bare string - nothing to do */
    5765           0 :                                 break;
    5766             :                         }
    5767             : 
    5768          21 :                         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) {
    5769           0 :                                 ulong key = (ulong) zend_atol(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
    5770           0 :                                 if (zend_hash_index_find(Z_ARRVAL_P(arr), key, (void **) &find_hash) == FAILURE) {
    5771           0 :                                         ALLOC_ZVAL(hash);
    5772           0 :                                         INIT_PZVAL(hash);
    5773           0 :                                         array_init(hash);
    5774             : 
    5775           0 :                                         zend_hash_index_update(Z_ARRVAL_P(arr), key, &hash, sizeof(zval *), NULL);
    5776             :                                 } else {
    5777           0 :                                         hash = *find_hash;
    5778             :                                 }
    5779             :                         } else {
    5780          21 :                                 if (zend_hash_find(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void **) &find_hash) == FAILURE) {
    5781           7 :                                         ALLOC_ZVAL(hash);
    5782           7 :                                         INIT_PZVAL(hash);
    5783           7 :                                         array_init(hash);
    5784             : 
    5785           7 :                                         zend_hash_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &hash, sizeof(zval *), NULL);
    5786             :                                 } else {
    5787          14 :                                         hash = *find_hash;
    5788             :                                 }
    5789             :                         }
    5790             : 
    5791          21 :                         if (Z_TYPE_P(hash) != IS_ARRAY) {
    5792           2 :                                 zval_dtor(hash);
    5793           2 :                                 INIT_PZVAL(hash);
    5794           2 :                                 array_init(hash);
    5795             :                         }
    5796             : 
    5797          21 :                         ALLOC_ZVAL(element);
    5798          63 :                         MAKE_COPY_ZVAL(&arg2, element);
    5799             : 
    5800          34 :                         if (arg3 && Z_STRLEN_P(arg3) > 0) {
    5801          13 :                                 add_assoc_zval_ex(hash, Z_STRVAL_P(arg3), Z_STRLEN_P(arg3) + 1, element);
    5802             :                         } else {
    5803           8 :                                 add_next_index_zval(hash, element);
    5804             :                         }
    5805             :                 }
    5806             :                 break;
    5807             : 
    5808             :                 case ZEND_INI_PARSER_SECTION:
    5809             :                         break;
    5810             :         }
    5811         692 : }
    5812             : /* }}} */
    5813             : 
    5814             : /* {{{ php_ini_parser_cb_with_sections
    5815             :  */
    5816         472 : static void php_ini_parser_cb_with_sections(zval *arg1, zval *arg2, zval *arg3, int callback_type, zval *arr TSRMLS_DC)
    5817             : {
    5818         472 :         if (callback_type == ZEND_INI_PARSER_SECTION) {
    5819          86 :                 MAKE_STD_ZVAL(BG(active_ini_file_section));
    5820          86 :                 array_init(BG(active_ini_file_section));
    5821          86 :                 zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, &BG(active_ini_file_section), sizeof(zval *), NULL);
    5822         386 :         } else if (arg2) {
    5823             :                 zval *active_arr;
    5824             : 
    5825         385 :                 if (BG(active_ini_file_section)) {
    5826         353 :                         active_arr = BG(active_ini_file_section);
    5827             :                 } else {
    5828          32 :                         active_arr = arr;
    5829             :                 }
    5830             : 
    5831         385 :                 php_simple_ini_parser_cb(arg1, arg2, arg3, callback_type, active_arr TSRMLS_CC);
    5832             :         }
    5833         472 : }
    5834             : /* }}} */
    5835             : 
    5836             : /* {{{ proto array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])
    5837             :    Parse configuration file */
    5838         109 : PHP_FUNCTION(parse_ini_file)
    5839             : {
    5840         109 :         char *filename = NULL;
    5841         109 :         int filename_len = 0;
    5842         109 :         zend_bool process_sections = 0;
    5843         109 :         long scanner_mode = ZEND_INI_SCANNER_NORMAL;
    5844             :         zend_file_handle fh;
    5845             :         zend_ini_parser_cb_t ini_parser_cb;
    5846             : 
    5847         109 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|bl", &filename, &filename_len, &process_sections, &scanner_mode) == FAILURE) {
    5848          14 :                 RETURN_FALSE;
    5849             :         }
    5850             : 
    5851          95 :         if (filename_len == 0) {
    5852           8 :                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filename cannot be empty!");
    5853           8 :                 RETURN_FALSE;
    5854             :         }
    5855             : 
    5856             :         /* Set callback function */
    5857          87 :         if (process_sections) {
    5858          38 :                 BG(active_ini_file_section) = NULL;
    5859          38 :                 ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
    5860             :         } else {
    5861          49 :                 ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
    5862             :         }
    5863             : 
    5864             :         /* Setup filehandle */
    5865          87 :         memset(&fh, 0, sizeof(fh));
    5866          87 :         fh.filename = filename;
    5867          87 :         fh.type = ZEND_HANDLE_FILENAME;
    5868             : 
    5869          87 :         array_init(return_value);
    5870          87 :         if (zend_parse_ini_file(&fh, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) {
    5871          22 :                 zend_hash_destroy(Z_ARRVAL_P(return_value));
    5872          22 :                 efree(Z_ARRVAL_P(return_value));
    5873          22 :                 RETURN_FALSE;
    5874             :         }
    5875             : }
    5876             : /* }}} */
    5877             : 
    5878             : /* {{{ proto array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])
    5879             :    Parse configuration string */
    5880          38 : PHP_FUNCTION(parse_ini_string)
    5881             : {
    5882          38 :         char *string = NULL, *str = NULL;
    5883          38 :         int str_len = 0;
    5884          38 :         zend_bool process_sections = 0;
    5885          38 :         long scanner_mode = ZEND_INI_SCANNER_NORMAL;
    5886             :         zend_ini_parser_cb_t ini_parser_cb;
    5887             : 
    5888          38 :         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) {
    5889           2 :                 RETURN_FALSE;
    5890             :         }
    5891             : 
    5892          36 :         if (INT_MAX - str_len < ZEND_MMAP_AHEAD) {
    5893           0 :                 RETVAL_FALSE;
    5894             :         }
    5895             : 
    5896             :         /* Set callback function */
    5897          36 :         if (process_sections) {
    5898           9 :                 BG(active_ini_file_section) = NULL;
    5899           9 :                 ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
    5900             :         } else {
    5901          27 :                 ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
    5902             :         }
    5903             : 
    5904             :         /* Setup string */
    5905          36 :         string = (char *) emalloc(str_len + ZEND_MMAP_AHEAD);
    5906          36 :         memcpy(string, str, str_len);
    5907          36 :         memset(string + str_len, 0, ZEND_MMAP_AHEAD);
    5908             : 
    5909          36 :         array_init(return_value);
    5910          36 :         if (zend_parse_ini_string(string, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) {
    5911           2 :                 zend_hash_destroy(Z_ARRVAL_P(return_value));
    5912           2 :                 efree(Z_ARRVAL_P(return_value));
    5913           2 :                 RETVAL_FALSE;
    5914             :         }
    5915          36 :         efree(string);
    5916             : }
    5917             : /* }}} */
    5918             : 
    5919             : #if ZEND_DEBUG
    5920             : /* This function returns an array of ALL valid ini options with values and 
    5921             :  *  is not the same as ini_get_all() which returns only registered ini options. Only useful for devs to debug php.ini scanner/parser! */
    5922             : PHP_FUNCTION(config_get_hash) /* {{{ */
    5923             : {
    5924             :         HashTable *hash = php_ini_get_configuration_hash();
    5925             : 
    5926             :         array_init(return_value);
    5927             :         zend_hash_apply_with_arguments(hash TSRMLS_CC, (apply_func_args_t) add_config_entry_cb, 1, return_value);
    5928             : }
    5929             : /* }}} */
    5930             : #endif
    5931             : 
    5932             : #ifdef HAVE_GETLOADAVG
    5933             : /* {{{ proto array sys_getloadavg()
    5934             : */
    5935           2 : PHP_FUNCTION(sys_getloadavg)
    5936             : {
    5937             :         double load[3];
    5938             : 
    5939           2 :         if (zend_parse_parameters_none() == FAILURE) {
    5940           1 :                 return;
    5941             :         }
    5942             : 
    5943           1 :         if (getloadavg(load, 3) == -1) {
    5944           0 :                 RETURN_FALSE;
    5945             :         } else {
    5946           1 :                 array_init(return_value);
    5947           1 :                 add_index_double(return_value, 0, load[0]);
    5948           1 :                 add_index_double(return_value, 1, load[1]);
    5949           1 :                 add_index_double(return_value, 2, load[2]);
    5950             :         }
    5951             : }
    5952             : /* }}} */
    5953             : #endif
    5954             : 
    5955             : /*
    5956             :  * Local variables:
    5957             :  * tab-width: 4
    5958             :  * c-basic-offset: 4
    5959             :  * End:
    5960             :  * vim600: fdm=marker
    5961             :  * vim: noet sw=4 ts=4
    5962             :  */

Generated by: LCOV version 1.10

Generated at Mon, 04 Aug 2014 15:49:15 +0000 (27 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.