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

Generated by: LCOV version 1.10

Generated at Tue, 27 Sep 2016 10:26:09 +0000 (2 days ago)

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