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: 932 1077 86.5 %
Date: 2016-06-20 Functions: 77 82 93.9 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10

Generated at Tue, 21 Jun 2016 03:10:06 +0000 (4 days ago)

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