LTP GCOV extension - code coverage report
Current view: directory - ext/standard - basic_functions.c
Test: PHP Code Coverage
Date: 2007-04-10 Instrumented lines: 1092
Code covered: 21.8 % Executed lines: 238
Legend: not executed executed

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

Generated by: LTP GCOV extension version 1.5