php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
basic_functions.c File Reference
#include "php.h"
#include "php_assert.h"
#include "php_crypt.h"
#include "php_streams.h"
#include "php_main.h"
#include "php_globals.h"
#include "php_variables.h"
#include "php_ini.h"
#include "php_image.h"
#include "php_standard.h"
#include "php_math.h"
#include "php_http.h"
#include "php_incomplete_class.h"
#include "php_getopt.h"
#include "php_ext_syslog.h"
#include "ext/standard/info.h"
#include "ext/session/php_session.h"
#include "zend_exceptions.h"
#include "zend_attributes.h"
#include "zend_enum.h"
#include "zend_ini.h"
#include "zend_operators.h"
#include "ext/standard/php_dns.h"
#include "ext/standard/php_uuencode.h"
#include "ext/standard/crc32_x86.h"
#include "zend.h"
#include "zend_ini_scanner.h"
#include "zend_language_scanner.h"
#include <zend_language_parser.h>
#include "zend_portability.h"
#include <stdarg.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netdb.h>
#include <string.h>
#include <locale.h>
#include "zend_globals.h"
#include "SAPI.h"
#include "php_ticks.h"
#include "php_fopen_wrappers.h"
#include "streamsfuncs.h"
#include "zend_frameless_function.h"
#include "basic_functions_arginfo.h"

Go to the source code of this file.

Data Structures

struct  _user_tick_function_entry
 

Macros

#define INADDR_NONE   ((zend_ulong) -1)
 
#define BASIC_MINIT_SUBMODULE(module)
 
#define BASIC_RINIT_SUBMODULE(module)
 
#define BASIC_MINFO_SUBMODULE(module)
 
#define BASIC_RSHUTDOWN_SUBMODULE(module)
 
#define BASIC_MSHUTDOWN_SUBMODULE(module)
 
#define ZVAL_SET_INI_STR(zv, val)
 
#define _CHECK_PATH(var, var_len, ini)
 

Typedefs

typedef struct yy_buffer_state * YY_BUFFER_STATE
 
typedef struct _user_tick_function_entry user_tick_function_entry
 

Functions

PHPAPI double php_get_nan (void)
 
PHPAPI double php_get_inf (void)
 
 register_basic_functions_symbols (module_number)
 
 php_register_incomplete_class_handlers ()
 
 php_register_url_stream_wrapper ("php", &php_stream_php_wrapper)
 
 php_register_url_stream_wrapper ("file", &php_plain_files_wrapper)
 
 php_register_url_stream_wrapper ("data", &php_stream_rfc2397_wrapper)
 
 php_register_url_stream_wrapper ("http", &php_stream_http_wrapper)
 
 php_register_url_stream_wrapper ("ftp", &php_stream_ftp_wrapper)
 
 php_unregister_url_stream_wrapper ("php")
 
 php_unregister_url_stream_wrapper ("http")
 
 php_unregister_url_stream_wrapper ("ftp")
 
 BG (serialize_lock)=0
 
memsetBG (serialize), 0, sizeof(BG(serialize))
 
memsetBG (unserialize), 0, sizeof(BG(unserialize))
 
 BG (strtok_string)
 
 BG (strtok_last)
 
 BG (ctype_string)
 
 BG (locale_changed)=0
 
 BG (user_compare_fci)
 
 BG (user_compare_fci_cache)
 
 BG (page_uid) = -1
 
 BG (page_gid) = -1
 
 BG (page_inode)
 
 BG (page_mtime)
 
 BG (user_shutdown_function_names)
 
PHP_RINIT filestat (INIT_FUNC_ARGS_PASSTHRU)
 
ZVAL_UNDEFBG (last_http_headers)
 
 FG (default_context)
 
 FG (stream_wrappers)
 
 FG (stream_filters)
 
 if (BG(user_tick_functions))
 
 php_info_print_table_end ()
 
 PHP_FUNCTION (constant)
 
 PHP_FUNCTION (inet_ntop)
 
 PHP_FUNCTION (inet_pton)
 
 PHP_FUNCTION (ip2long)
 
 PHP_FUNCTION (long2ip)
 
PHPAPI zend_stringphp_getenv (const char *str, size_t str_len)
 
 PHP_FUNCTION (getenv)
 
 PHP_FUNCTION (getopt)
 
 PHP_FUNCTION (flush)
 
 PHP_FUNCTION (sleep)
 
 PHP_FUNCTION (usleep)
 
 PHP_FUNCTION (get_current_user)
 
 PHP_FUNCTION (get_cfg_var)
 
 PHP_FUNCTION (error_log)
 
PHPAPI int _php_error_log (int opt_err, const char *message, const char *opt, const char *headers)
 
PHPAPI int _php_error_log_ex (int opt_err, const char *message, size_t message_len, const char *opt, const char *headers)
 
 PHP_FUNCTION (error_get_last)
 
 PHP_FUNCTION (error_clear_last)
 
 PHP_FUNCTION (call_user_func)
 
 PHP_FUNCTION (call_user_func_array)
 
 PHP_FUNCTION (forward_static_call)
 
 PHP_FUNCTION (forward_static_call_array)
 
PHPAPI void php_call_shutdown_functions (void)
 
PHPAPI void php_free_shutdown_functions (void)
 
 PHP_FUNCTION (register_shutdown_function)
 
PHPAPI bool register_user_shutdown_function (const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry)
 
PHPAPI bool remove_user_shutdown_function (const char *function_name, size_t function_len)
 
PHPAPI bool append_user_shutdown_function (php_shutdown_function_entry *shutdown_function_entry)
 
ZEND_API void php_get_highlight_struct (zend_syntax_highlighter_ini *syntax_highlighter_ini)
 
 PHP_FUNCTION (highlight_file)
 
 PHP_FUNCTION (php_strip_whitespace)
 
 PHP_FUNCTION (highlight_string)
 
 PHP_FUNCTION (ini_parse_quantity)
 
 PHP_FUNCTION (ini_get)
 
 PHP_FUNCTION (ini_get_all)
 
 PHP_FUNCTION (ini_set)
 
 PHP_FUNCTION (ini_restore)
 
 PHP_FUNCTION (set_include_path)
 
 PHP_FUNCTION (get_include_path)
 
 PHP_FUNCTION (print_r)
 
 PHP_FUNCTION (connection_aborted)
 
 PHP_FUNCTION (connection_status)
 
 PHP_FUNCTION (ignore_user_abort)
 
 PHP_FUNCTION (register_tick_function)
 
 PHP_FUNCTION (unregister_tick_function)
 
 PHP_FUNCTION (is_uploaded_file)
 
 PHP_FUNCTION (move_uploaded_file)
 
 PHP_FUNCTION (parse_ini_file)
 
 PHP_FUNCTION (parse_ini_string)
 

Variables

PHPAPI php_basic_globals basic_globals
 
zend_module_entry basic_functions_module
 
 php_ce_incomplete_class = register_class___PHP_Incomplete_Class()
 
 assertion_error_ce = register_class_AssertionError(zend_ce_error)
 
 rounding_mode_ce = register_class_RoundingMode()
 
return SUCCESS
 

Macro Definition Documentation

◆ _CHECK_PATH

#define _CHECK_PATH ( var,
var_len,
ini )
Value:
php_ini_check_path(var, var_len, ini, sizeof(ini))
ini
Definition phar.c:63

◆ BASIC_MINFO_SUBMODULE

#define BASIC_MINFO_SUBMODULE ( module)
Value:
#define PHP_MINFO
Definition php.h:396
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU

Definition at line 267 of file basic_functions.c.

◆ BASIC_MINIT_SUBMODULE

#define BASIC_MINIT_SUBMODULE ( module)
Value:
return FAILURE; \
}
#define SUCCESS
Definition hash_sha3.c:261
#define PHP_MINIT
Definition php.h:392
#define INIT_FUNC_ARGS_PASSTHRU
@ FAILURE
Definition zend_types.h:61

Definition at line 259 of file basic_functions.c.

◆ BASIC_MSHUTDOWN_SUBMODULE

#define BASIC_MSHUTDOWN_SUBMODULE ( module)
Value:
#define PHP_MSHUTDOWN
Definition php.h:393
#define SHUTDOWN_FUNC_ARGS_PASSTHRU

Definition at line 273 of file basic_functions.c.

◆ BASIC_RINIT_SUBMODULE

#define BASIC_RINIT_SUBMODULE ( module)
Value:
#define PHP_RINIT
Definition php.h:394

Definition at line 264 of file basic_functions.c.

◆ BASIC_RSHUTDOWN_SUBMODULE

#define BASIC_RSHUTDOWN_SUBMODULE ( module)
Value:
#define PHP_RSHUTDOWN
Definition php.h:395

Definition at line 270 of file basic_functions.c.

◆ INADDR_NONE

#define INADDR_NONE   ((zend_ulong) -1)

Definition at line 101 of file basic_functions.c.

◆ ZVAL_SET_INI_STR

#define ZVAL_SET_INI_STR ( zv,
val )
Value:
do { \
ZVAL_INTERNED_STR(zv, val); \
} else if (ZSTR_LEN(val) == 0) { \
ZVAL_EMPTY_STRING(zv); \
} else if (ZSTR_LEN(val) == 1) { \
ZVAL_CHAR(zv, ZSTR_VAL(val)[0]); \
} else if (!(GC_FLAGS(val) & GC_PERSISTENT)) { \
ZVAL_NEW_STR(zv, zend_string_copy(val)); \
} else { \
ZVAL_NEW_STR(zv, zend_string_init(ZSTR_VAL(val), ZSTR_LEN(val), 0)); \
} \
} while (0)
zval * zv
Definition ffi.c:3975
zval * val
Definition ffi.c:4262
#define ZSTR_IS_INTERNED(s)
Definition zend_string.h:84
#define ZSTR_VAL(zstr)
Definition zend_string.h:68
#define ZSTR_LEN(zstr)
Definition zend_string.h:69
#define GC_FLAGS(p)
Definition zend_types.h:756
#define GC_PERSISTENT
Definition zend_types.h:781

Definition at line 1240 of file basic_functions.c.

Typedef Documentation

◆ user_tick_function_entry

◆ YY_BUFFER_STATE

typedef struct yy_buffer_state* YY_BUFFER_STATE

Definition at line 50 of file basic_functions.c.

Function Documentation

◆ _php_error_log()

PHPAPI int _php_error_log ( int opt_err,
const char * message,
const char * opt,
const char * headers )

Definition at line 1352 of file basic_functions.c.

◆ _php_error_log_ex()

PHPAPI int _php_error_log_ex ( int opt_err,
const char * message,
size_t message_len,
const char * opt,
const char * headers )

Definition at line 1358 of file basic_functions.c.

◆ append_user_shutdown_function()

PHPAPI bool append_user_shutdown_function ( php_shutdown_function_entry * shutdown_function_entry)

Definition at line 1730 of file basic_functions.c.

◆ BG() [1/15]

BG ( ctype_string )

◆ BG() [2/15]

zval_ptr_dtor & BG ( last_http_headers )

◆ BG() [3/15]

BG ( locale_changed )
pure virtual

◆ BG() [4/15]

BG ( page_gid ) = -1

◆ BG() [5/15]

BG ( page_inode )

◆ BG() [6/15]

BG ( page_mtime )

◆ BG() [7/15]

BG ( page_uid ) = -1

◆ BG() [8/15]

memset & BG ( serialize )

◆ BG() [9/15]

BG ( serialize_lock )
pure virtual

◆ BG() [10/15]

BG ( strtok_last )

◆ BG() [11/15]

BG ( strtok_string )

◆ BG() [12/15]

memset & BG ( unserialize )

◆ BG() [13/15]

BG ( user_compare_fci )

◆ BG() [14/15]

BG ( user_compare_fci_cache )

◆ BG() [15/15]

BG ( user_shutdown_function_names )

◆ FG() [1/3]

FG ( default_context )

◆ FG() [2/3]

FG ( stream_filters )

◆ FG() [3/3]

FG ( stream_wrappers )

◆ filestat()

◆ if()

if ( BG(user_tick_functions) )

Definition at line 471 of file basic_functions.c.

◆ php_call_shutdown_functions()

PHPAPI void php_call_shutdown_functions ( void )

Definition at line 1663 of file basic_functions.c.

◆ php_free_shutdown_functions()

PHPAPI void php_free_shutdown_functions ( void )

Definition at line 1673 of file basic_functions.c.

◆ PHP_FUNCTION() [1/40]

PHP_FUNCTION ( call_user_func )

Definition at line 1449 of file basic_functions.c.

◆ PHP_FUNCTION() [2/40]

PHP_FUNCTION ( call_user_func_array )

Definition at line 1473 of file basic_functions.c.

◆ PHP_FUNCTION() [3/40]

PHP_FUNCTION ( connection_aborted )

Definition at line 2122 of file basic_functions.c.

◆ PHP_FUNCTION() [4/40]

PHP_FUNCTION ( connection_status )

Definition at line 2131 of file basic_functions.c.

◆ PHP_FUNCTION() [5/40]

PHP_FUNCTION ( constant )

Definition at line 500 of file basic_functions.c.

◆ PHP_FUNCTION() [6/40]

PHP_FUNCTION ( error_clear_last )

Definition at line 1428 of file basic_functions.c.

◆ PHP_FUNCTION() [7/40]

PHP_FUNCTION ( error_get_last )

Definition at line 1404 of file basic_functions.c.

◆ PHP_FUNCTION() [8/40]

PHP_FUNCTION ( error_log )

Definition at line 1329 of file basic_functions.c.

◆ PHP_FUNCTION() [9/40]

PHP_FUNCTION ( flush )

Definition at line 1098 of file basic_functions.c.

◆ PHP_FUNCTION() [10/40]

PHP_FUNCTION ( forward_static_call )

Definition at line 1498 of file basic_functions.c.

◆ PHP_FUNCTION() [11/40]

PHP_FUNCTION ( forward_static_call_array )

Definition at line 1533 of file basic_functions.c.

◆ PHP_FUNCTION() [12/40]

PHP_FUNCTION ( get_cfg_var )

Definition at line 1290 of file basic_functions.c.

◆ PHP_FUNCTION() [13/40]

PHP_FUNCTION ( get_current_user )

Definition at line 1232 of file basic_functions.c.

◆ PHP_FUNCTION() [14/40]

PHP_FUNCTION ( get_include_path )

Definition at line 2084 of file basic_functions.c.

◆ PHP_FUNCTION() [15/40]

PHP_FUNCTION ( getenv )

Definition at line 691 of file basic_functions.c.

◆ PHP_FUNCTION() [16/40]

PHP_FUNCTION ( getopt )

Definition at line 917 of file basic_functions.c.

◆ PHP_FUNCTION() [17/40]

PHP_FUNCTION ( highlight_file )

Definition at line 1752 of file basic_functions.c.

◆ PHP_FUNCTION() [18/40]

PHP_FUNCTION ( highlight_string )

Definition at line 1828 of file basic_functions.c.

◆ PHP_FUNCTION() [19/40]

PHP_FUNCTION ( ignore_user_abort )

Definition at line 2140 of file basic_functions.c.

◆ PHP_FUNCTION() [20/40]

PHP_FUNCTION ( inet_ntop )

Definition at line 526 of file basic_functions.c.

◆ PHP_FUNCTION() [21/40]

PHP_FUNCTION ( inet_pton )

Definition at line 555 of file basic_functions.c.

◆ PHP_FUNCTION() [22/40]

PHP_FUNCTION ( ini_get )

Definition at line 1888 of file basic_functions.c.

◆ PHP_FUNCTION() [23/40]

PHP_FUNCTION ( ini_get_all )

Definition at line 1907 of file basic_functions.c.

◆ PHP_FUNCTION() [24/40]

PHP_FUNCTION ( ini_parse_quantity )

Definition at line 1869 of file basic_functions.c.

◆ PHP_FUNCTION() [25/40]

PHP_FUNCTION ( ini_restore )

Definition at line 2042 of file basic_functions.c.

◆ PHP_FUNCTION() [26/40]

PHP_FUNCTION ( ini_set )

Definition at line 1988 of file basic_functions.c.

◆ PHP_FUNCTION() [27/40]

PHP_FUNCTION ( ip2long )

Definition at line 588 of file basic_functions.c.

◆ PHP_FUNCTION() [28/40]

PHP_FUNCTION ( is_uploaded_file )

Definition at line 2327 of file basic_functions.c.

◆ PHP_FUNCTION() [29/40]

PHP_FUNCTION ( long2ip )

Definition at line 606 of file basic_functions.c.

◆ PHP_FUNCTION() [30/40]

PHP_FUNCTION ( move_uploaded_file )

Definition at line 2349 of file basic_functions.c.

◆ PHP_FUNCTION() [31/40]

PHP_FUNCTION ( parse_ini_file )

Definition at line 2481 of file basic_functions.c.

◆ PHP_FUNCTION() [32/40]

PHP_FUNCTION ( parse_ini_string )

Definition at line 2522 of file basic_functions.c.

◆ PHP_FUNCTION() [33/40]

PHP_FUNCTION ( php_strip_whitespace )

Definition at line 1796 of file basic_functions.c.

◆ PHP_FUNCTION() [34/40]

PHP_FUNCTION ( print_r )

Definition at line 2101 of file basic_functions.c.

◆ PHP_FUNCTION() [35/40]

PHP_FUNCTION ( register_shutdown_function )

Definition at line 1689 of file basic_functions.c.

◆ PHP_FUNCTION() [36/40]

PHP_FUNCTION ( register_tick_function )

Definition at line 2281 of file basic_functions.c.

◆ PHP_FUNCTION() [37/40]

PHP_FUNCTION ( set_include_path )

Definition at line 2055 of file basic_functions.c.

◆ PHP_FUNCTION() [38/40]

PHP_FUNCTION ( sleep )

Definition at line 1107 of file basic_functions.c.

◆ PHP_FUNCTION() [39/40]

PHP_FUNCTION ( unregister_tick_function )

Definition at line 2310 of file basic_functions.c.

◆ PHP_FUNCTION() [40/40]

PHP_FUNCTION ( usleep )

Definition at line 1125 of file basic_functions.c.

◆ php_get_highlight_struct()

ZEND_API void php_get_highlight_struct ( zend_syntax_highlighter_ini * syntax_highlighter_ini)

Definition at line 1741 of file basic_functions.c.

◆ php_get_inf()

PHPAPI double php_get_inf ( void )

Definition at line 253 of file basic_functions.c.

◆ php_get_nan()

PHPAPI double php_get_nan ( void )

Definition at line 247 of file basic_functions.c.

◆ php_getenv()

PHPAPI zend_string * php_getenv ( const char * str,
size_t str_len )

Definition at line 632 of file basic_functions.c.

◆ php_info_print_table_end()

php_info_print_table_end ( )

Definition at line 1074 of file info.c.

◆ php_register_incomplete_class_handlers()

php_register_incomplete_class_handlers ( )

Definition at line 111 of file incomplete_class.c.

◆ php_register_url_stream_wrapper() [1/5]

php_register_url_stream_wrapper ( "data" ,
& php_stream_rfc2397_wrapper )

◆ php_register_url_stream_wrapper() [2/5]

php_register_url_stream_wrapper ( "file" ,
& php_plain_files_wrapper )

◆ php_register_url_stream_wrapper() [3/5]

php_register_url_stream_wrapper ( "ftp" ,
& php_stream_ftp_wrapper )

◆ php_register_url_stream_wrapper() [4/5]

php_register_url_stream_wrapper ( "http" ,
& php_stream_http_wrapper )

◆ php_register_url_stream_wrapper() [5/5]

php_register_url_stream_wrapper ( "php" ,
& php_stream_php_wrapper )

◆ php_unregister_url_stream_wrapper() [1/3]

php_unregister_url_stream_wrapper ( "ftp" )

◆ php_unregister_url_stream_wrapper() [2/3]

php_unregister_url_stream_wrapper ( "http" )

◆ php_unregister_url_stream_wrapper() [3/3]

php_unregister_url_stream_wrapper ( "php" )

◆ register_basic_functions_symbols()

register_basic_functions_symbols ( module_number )

◆ register_user_shutdown_function()

PHPAPI bool register_user_shutdown_function ( const char * function_name,
size_t function_len,
php_shutdown_function_entry * shutdown_function_entry )

Definition at line 1708 of file basic_functions.c.

◆ remove_user_shutdown_function()

PHPAPI bool remove_user_shutdown_function ( const char * function_name,
size_t function_len )

Definition at line 1720 of file basic_functions.c.

Variable Documentation

◆ assertion_error_ce

assertion_error_ce = register_class_AssertionError(zend_ce_error)

Definition at line 295 of file basic_functions.c.

◆ basic_functions_module

zend_module_entry basic_functions_module
Initial value:
= {
standard_deps,
"standard",
ext_functions,
PHP_MINIT(basic),
PHP_MSHUTDOWN(basic),
PHP_RINIT(basic),
PHP_RSHUTDOWN(basic),
PHP_MINFO(basic),
}
#define NULL
Definition gdcache.h:45
#define PHP_STANDARD_VERSION
#define STANDARD_MODULE_PROPERTIES
#define STANDARD_MODULE_HEADER_EX

Definition at line 148 of file basic_functions.c.

◆ basic_globals

PHPAPI php_basic_globals basic_globals

Definition at line 112 of file basic_functions.c.

◆ php_ce_incomplete_class

php_ce_incomplete_class = register_class___PHP_Incomplete_Class()

Definition at line 292 of file basic_functions.c.

◆ rounding_mode_ce

rounding_mode_ce = register_class_RoundingMode()

Definition at line 297 of file basic_functions.c.

◆ SUCCESS

return SUCCESS

Definition at line 348 of file basic_functions.c.