php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
basic_functions.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Andi Gutmans <andi@php.net> |
14 | Zeev Suraski <zeev@php.net> |
15 +----------------------------------------------------------------------+
16*/
17
18#ifndef BASIC_FUNCTIONS_H
19#define BASIC_FUNCTIONS_H
20
21#include <sys/stat.h>
22#include <wchar.h>
23
24#include "php_filestat.h"
25
26#include "zend_highlight.h"
27
28#include "url_scanner_ex.h"
29
30#if defined(_WIN32) && !defined(__clang__)
31#include <intrin.h>
32#endif
33
35#define basic_functions_module_ptr &basic_functions_module
36
42
44
45PHP_MINIT_FUNCTION(user_filters);
46PHP_RSHUTDOWN_FUNCTION(user_filters);
48
49/* Left for BC (not binary safe!) */
50PHPAPI int _php_error_log(int opt_err, const char *message, const char *opt, const char *headers);
51PHPAPI int _php_error_log_ex(int opt_err, const char *message, size_t message_len, const char *opt, const char *headers);
52PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, bool add_underscore);
53
54typedef struct _php_basic_globals {
58 zend_string *ctype_string; /* current LC_CTYPE locale (or NULL for 'C') */
59 bool locale_changed; /* locale was changed and has to be restored */
61 char strtok_table[256];
62 size_t strtok_len;
66
68
69 /* http_fopen_wrapper.c */
71
72 /* pageinfo.c */
76 time_t page_mtime;
77
78 /* filestat.c && main/streams/streams.c */
81
82 /* syslog.c */
84
85 /* var.c */
86 unsigned serialize_lock; /* whether to use the locally supplied var_hash instead (__sleep/__wakeup) */
87 struct {
89 unsigned level;
90 } serialize;
91 struct {
92 struct php_unserialize_data *data;
93 unsigned level;
94 } unserialize;
95
96 /* url_scanner_ex.re */
102
103 /* file.c */
104#if defined(_REENTRANT)
105 mbstate_t mblen_state;
106#endif
107
108 int umask;
111
112#ifdef ZTS
113#define BG(v) ZEND_TSRMG(basic_globals_id, php_basic_globals *, v)
114PHPAPI extern int basic_globals_id;
115#else
116#define BG(v) (basic_globals.v)
118#endif
119
120PHPAPI zend_string *php_getenv(const char *str, size_t str_len);
121
122PHPAPI double php_get_nan(void);
123PHPAPI double php_get_inf(void);
124
129
130PHPAPI extern bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry);
131PHPAPI extern bool remove_user_shutdown_function(const char *function_name, size_t function_len);
132PHPAPI extern bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry);
133
136
137
138#endif /* BASIC_FUNCTIONS_H */
zend_module_entry basic_functions_module
PHPAPI php_basic_globals basic_globals
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)
struct _php_shutdown_function_entry php_shutdown_function_entry
PHPAPI void php_call_shutdown_functions(void)
struct _php_basic_globals php_basic_globals
PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, bool add_underscore)
Definition array.c:1837
ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini)
PHPAPI zend_string * php_getenv(const char *str, size_t str_len)
PHPAPI double php_get_nan(void)
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)
PHPAPI double php_get_inf(void)
PHPAPI bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry)
PHPAPI void php_free_shutdown_functions(void)
#define prefix
#define PHP_MSHUTDOWN_FUNCTION
Definition php.h:401
#define PHP_MINIT_FUNCTION
Definition php.h:400
#define PHP_MINFO_FUNCTION
Definition php.h:404
#define PHP_RINIT_FUNCTION
Definition php.h:402
#define PHP_RSHUTDOWN_FUNCTION
Definition php.h:403
#define PHPAPI
Definition php.h:71
struct _php_stream_statbuf php_stream_statbuf
zend_string * var_name
Definition session.c:966
php_stream_statbuf lssb
HashTable url_adapt_session_hosts_ht
url_adapt_state_ex_t url_adapt_output_ex
HashTable * user_shutdown_function_names
zend_string * CurrentStatFile
zend_llist * user_tick_functions
HashTable url_adapt_output_hosts_ht
struct php_serialize_data * data
zend_fcall_info_cache user_compare_fci_cache
zend_string * ctype_string
zend_long unserialize_max_depth
zend_string * strtok_string
zend_string * CurrentLStatFile
zend_fcall_info user_compare_fci
HashTable * user_filter_map
url_adapt_state_ex_t url_adapt_session_ex
php_stream_statbuf ssb
zend_fcall_info_cache fci_cache
zend_fcall_info fci
struct _zend_fcall_info_cache zend_fcall_info_cache
struct _zend_fcall_info zend_fcall_info
struct _zval_struct zval
#define ZEND_API
zend_syntax_highlighter_ini syntax_highlighter_ini
struct _zend_syntax_highlighter_ini zend_syntax_highlighter_ini
struct _zend_llist zend_llist
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
struct _zend_module_entry zend_module_entry
struct _zend_array HashTable
Definition zend_types.h:386
bool result