php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_ini.h File Reference
#include "zend_modules.h"

Go to the source code of this file.

Data Structures

struct  _zend_ini_entry_def
 
struct  _zend_ini_entry
 
struct  _zend_ini_parser_param
 

Macros

#define ZEND_INI_USER   (1<<0)
 
#define ZEND_INI_PERDIR   (1<<1)
 
#define ZEND_INI_SYSTEM   (1<<2)
 
#define ZEND_INI_ALL   (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
 
#define ZEND_INI_MH(name)
 
#define ZEND_INI_DISP(name)
 
#define ZEND_INI_BEGIN()
 
#define ZEND_INI_END()
 
#define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer)
 
#define ZEND_INI_ENTRY3(name, default_value, modifiable, on_modify, arg1, arg2, arg3)
 
#define ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, displayer)
 
#define ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, arg1, arg2)
 
#define ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, displayer)
 
#define ZEND_INI_ENTRY1(name, default_value, modifiable, on_modify, arg1)
 
#define ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, displayer)
 
#define ZEND_INI_ENTRY(name, default_value, modifiable, on_modify)
 
#define STD_ZEND_INI_ENTRY(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr)
 
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr, displayer)
 
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr)
 
#define INI_INT(name)
 
#define INI_FLT(name)
 
#define INI_STR(name)
 
#define INI_BOOL(name)
 
#define INI_ORIG_INT(name)
 
#define INI_ORIG_FLT(name)
 
#define INI_ORIG_STR(name)
 
#define INI_ORIG_BOOL(name)
 
#define REGISTER_INI_ENTRIES()
 
#define UNREGISTER_INI_ENTRIES()
 
#define DISPLAY_INI_ENTRIES()
 
#define REGISTER_INI_DISPLAYER(name, displayer)
 
#define REGISTER_INI_BOOLEAN(name)
 
#define ZEND_INI_DISPLAY_ORIG   1
 
#define ZEND_INI_DISPLAY_ACTIVE   2
 
#define ZEND_INI_STAGE_STARTUP   (1<<0)
 
#define ZEND_INI_STAGE_SHUTDOWN   (1<<1)
 
#define ZEND_INI_STAGE_ACTIVATE   (1<<2)
 
#define ZEND_INI_STAGE_DEACTIVATE   (1<<3)
 
#define ZEND_INI_STAGE_RUNTIME   (1<<4)
 
#define ZEND_INI_STAGE_HTACCESS   (1<<5)
 
#define ZEND_INI_STAGE_IN_REQUEST   (ZEND_INI_STAGE_ACTIVATE|ZEND_INI_STAGE_DEACTIVATE|ZEND_INI_STAGE_RUNTIME|ZEND_INI_STAGE_HTACCESS)
 
#define ZEND_INI_PARSER_ENTRY   1 /* Normal entry: foo = bar */
 
#define ZEND_INI_PARSER_SECTION   2 /* Section: [foobar] */
 
#define ZEND_INI_PARSER_POP_ENTRY   3 /* Offset entry: foo[] = bar */
 
#define ZEND_INI_GET_BASE()
 
#define ZEND_INI_GET_ADDR()
 

Typedefs

typedef struct _zend_ini_entry_def zend_ini_entry_def
 
typedef void(* zend_ini_parser_cb_t) (zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg)
 
typedef struct _zend_ini_parser_param zend_ini_parser_param
 

Functions

ZEND_API void zend_ini_startup (void)
 
ZEND_API void zend_ini_shutdown (void)
 
ZEND_API void zend_ini_global_shutdown (void)
 
ZEND_API void zend_ini_deactivate (void)
 
ZEND_API void zend_ini_dtor (HashTable *ini_directives)
 
ZEND_API void zend_copy_ini_directives (void)
 
ZEND_API void zend_ini_sort_entries (void)
 
ZEND_API zend_result zend_register_ini_entries (const zend_ini_entry_def *ini_entry, int module_number)
 
ZEND_API zend_result zend_register_ini_entries_ex (const zend_ini_entry_def *ini_entry, int module_number, int module_type)
 
ZEND_API void zend_unregister_ini_entries (int module_number)
 
ZEND_API void zend_unregister_ini_entries_ex (int module_number, int module_type)
 
ZEND_API void zend_ini_refresh_caches (int stage)
 
ZEND_API zend_result zend_alter_ini_entry (zend_string *name, zend_string *new_value, int modify_type, int stage)
 
ZEND_API zend_result zend_alter_ini_entry_ex (zend_string *name, zend_string *new_value, int modify_type, int stage, bool force_change)
 
ZEND_API zend_result zend_alter_ini_entry_chars (zend_string *name, const char *value, size_t value_length, int modify_type, int stage)
 
ZEND_API zend_result zend_alter_ini_entry_chars_ex (zend_string *name, const char *value, size_t value_length, int modify_type, int stage, int force_change)
 
ZEND_API zend_result zend_restore_ini_entry (zend_string *name, int stage)
 
ZEND_API void display_ini_entries (zend_module_entry *module)
 
ZEND_API zend_long zend_ini_long (const char *name, size_t name_length, int orig)
 
ZEND_API double zend_ini_double (const char *name, size_t name_length, int orig)
 
ZEND_API char * zend_ini_string (const char *name, size_t name_length, int orig)
 
ZEND_API char * zend_ini_string_ex (const char *name, size_t name_length, int orig, bool *exists)
 
ZEND_API zend_stringzend_ini_str (const char *name, size_t name_length, bool orig)
 
ZEND_API zend_stringzend_ini_str_ex (const char *name, size_t name_length, bool orig, bool *exists)
 
ZEND_API zend_stringzend_ini_get_value (zend_string *name)
 
ZEND_API bool zend_ini_parse_bool (zend_string *str)
 
ZEND_API zend_long zend_ini_parse_quantity (zend_string *value, zend_string **errstr)
 
ZEND_API zend_ulong zend_ini_parse_uquantity (zend_string *value, zend_string **errstr)
 
ZEND_API zend_long zend_ini_parse_quantity_warn (zend_string *value, zend_string *setting)
 
ZEND_API zend_ulong zend_ini_parse_uquantity_warn (zend_string *value, zend_string *setting)
 
ZEND_API zend_result zend_ini_register_displayer (const char *name, uint32_t name_length, void(*displayer)(zend_ini_entry *ini_entry, int type))
 
ZEND_API ZEND_INI_DISP (zend_ini_boolean_displayer_cb)
 
ZEND_API ZEND_INI_DISP (zend_ini_color_displayer_cb)
 
ZEND_API ZEND_INI_DISP (display_link_numbers)
 
ZEND_API ZEND_INI_MH (OnUpdateBool)
 
ZEND_API ZEND_INI_MH (OnUpdateLong)
 
ZEND_API ZEND_INI_MH (OnUpdateLongGEZero)
 
ZEND_API ZEND_INI_MH (OnUpdateReal)
 
ZEND_API ZEND_INI_MH (OnUpdateString)
 
ZEND_API ZEND_INI_MH (OnUpdateStringUnempty)
 
ZEND_API ZEND_INI_MH (OnUpdateStr)
 
ZEND_API ZEND_INI_MH (OnUpdateStrNotEmpty)
 
ZEND_API zend_result zend_parse_ini_file (zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg)
 
ZEND_API zend_result zend_parse_ini_string (const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg)
 

Macro Definition Documentation

◆ DISPLAY_INI_ENTRIES

#define DISPLAY_INI_ENTRIES ( )
Value:
display_ini_entries(zend_module)
ZEND_API void display_ini_entries(zend_module_entry *module)
Definition php_ini.c:116

Definition at line 205 of file zend_ini.h.

◆ INI_BOOL

#define INI_BOOL ( name)
Value:
((bool) INI_INT(name))
#define INI_INT(name)
Definition zend_ini.h:193
zend_string * name

Definition at line 196 of file zend_ini.h.

◆ INI_FLT

#define INI_FLT ( name)
Value:
strlen(string $string)
ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig)
Definition zend_ini.c:464

Definition at line 194 of file zend_ini.h.

◆ INI_INT

#define INI_INT ( name)
Value:
ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, int orig)
Definition zend_ini.c:447

Definition at line 193 of file zend_ini.h.

◆ INI_ORIG_BOOL

#define INI_ORIG_BOOL ( name)
Value:
((bool) INI_ORIG_INT(name))
#define INI_ORIG_INT(name)
Definition zend_ini.h:198

Definition at line 201 of file zend_ini.h.

◆ INI_ORIG_FLT

#define INI_ORIG_FLT ( name)
Value:

Definition at line 199 of file zend_ini.h.

◆ INI_ORIG_INT

#define INI_ORIG_INT ( name)
Value:

Definition at line 198 of file zend_ini.h.

◆ INI_ORIG_STR

#define INI_ORIG_STR ( name)
Value:
ZEND_API char * zend_ini_string(const char *name, size_t name_length, int orig)
Definition zend_ini.c:505

Definition at line 200 of file zend_ini.h.

◆ INI_STR

#define INI_STR ( name)
Value:
#define NULL
Definition gdcache.h:45
ZEND_API char * zend_ini_string_ex(const char *name, size_t name_length, int orig, bool *exists)
Definition zend_ini.c:481

Definition at line 195 of file zend_ini.h.

◆ REGISTER_INI_BOOLEAN

#define REGISTER_INI_BOOLEAN ( name)
Value:
REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
#define REGISTER_INI_DISPLAYER(name, displayer)
Definition zend_ini.h:207

Definition at line 208 of file zend_ini.h.

◆ REGISTER_INI_DISPLAYER

#define REGISTER_INI_DISPLAYER ( name,
displayer )
Value:
ZEND_API zend_result zend_ini_register_displayer(const char *name, uint32_t name_length, void(*displayer)(zend_ini_entry *ini_entry, int type))
Definition zend_ini.c:429

Definition at line 207 of file zend_ini.h.

◆ REGISTER_INI_ENTRIES

#define REGISTER_INI_ENTRIES ( )
Value:
zend_register_ini_entries_ex(ini_entries, module_number, type)
zend_ffi_type * type
Definition ffi.c:3812
ZEND_API zend_result zend_register_ini_entries_ex(const zend_ini_entry_def *ini_entry, int module_number, int module_type)
Definition zend_ini.c:204

Definition at line 203 of file zend_ini.h.

◆ STD_ZEND_INI_BOOLEAN

#define STD_ZEND_INI_BOOLEAN ( name,
default_value,
modifiable,
on_modify,
property_name,
struct_type,
struct_ptr )
Value:
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
#define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer)
Definition zend_ini.h:153
#define XtOffsetOf(s_type, field)

Definition at line 189 of file zend_ini.h.

◆ STD_ZEND_INI_ENTRY

#define STD_ZEND_INI_ENTRY ( name,
default_value,
modifiable,
on_modify,
property_name,
struct_type,
struct_ptr )
Value:
ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr)
#define ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, arg1, arg2)
Definition zend_ini.h:162

Definition at line 185 of file zend_ini.h.

◆ STD_ZEND_INI_ENTRY_EX

#define STD_ZEND_INI_ENTRY_EX ( name,
default_value,
modifiable,
on_modify,
property_name,
struct_type,
struct_ptr,
displayer )
Value:
ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer)
#define ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, displayer)
Definition zend_ini.h:159

Definition at line 187 of file zend_ini.h.

◆ UNREGISTER_INI_ENTRIES

#define UNREGISTER_INI_ENTRIES ( )
Value:
ZEND_API void zend_unregister_ini_entries_ex(int module_number, int module_type)
Definition zend_ini.c:283

Definition at line 204 of file zend_ini.h.

◆ ZEND_INI_ALL

Definition at line 28 of file zend_ini.h.

◆ ZEND_INI_BEGIN

#define ZEND_INI_BEGIN ( )
Value:
static const zend_ini_entry_def ini_entries[] = {
struct _zend_ini_entry_def zend_ini_entry_def

Definition at line 150 of file zend_ini.h.

◆ ZEND_INI_DISP

#define ZEND_INI_DISP ( name)
Value:
ZEND_COLD void name(zend_ini_entry *ini_entry, int type)
struct _zend_ini_entry zend_ini_entry
#define ZEND_COLD

Definition at line 31 of file zend_ini.h.

◆ ZEND_INI_DISPLAY_ACTIVE

#define ZEND_INI_DISPLAY_ACTIVE   2

Definition at line 225 of file zend_ini.h.

◆ ZEND_INI_DISPLAY_ORIG

#define ZEND_INI_DISPLAY_ORIG   1

Definition at line 224 of file zend_ini.h.

◆ ZEND_INI_END

#define ZEND_INI_END ( )
Value:
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0} };

Definition at line 151 of file zend_ini.h.

◆ ZEND_INI_ENTRY

#define ZEND_INI_ENTRY ( name,
default_value,
modifiable,
on_modify )
Value:
ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, NULL)
#define ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, displayer)
Definition zend_ini.h:171

Definition at line 174 of file zend_ini.h.

◆ ZEND_INI_ENTRY1

#define ZEND_INI_ENTRY1 ( name,
default_value,
modifiable,
on_modify,
arg1 )
Value:
ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, NULL)
#define ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, displayer)
Definition zend_ini.h:165
zval * arg1

Definition at line 168 of file zend_ini.h.

◆ ZEND_INI_ENTRY1_EX

#define ZEND_INI_ENTRY1_EX ( name,
default_value,
modifiable,
on_modify,
arg1,
displayer )
Value:
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, NULL, NULL, displayer)

Definition at line 165 of file zend_ini.h.

◆ ZEND_INI_ENTRY2

#define ZEND_INI_ENTRY2 ( name,
default_value,
modifiable,
on_modify,
arg1,
arg2 )
Value:
ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL)
zval * arg2

Definition at line 162 of file zend_ini.h.

◆ ZEND_INI_ENTRY2_EX

#define ZEND_INI_ENTRY2_EX ( name,
default_value,
modifiable,
on_modify,
arg1,
arg2,
displayer )
Value:
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL, displayer)

Definition at line 159 of file zend_ini.h.

◆ ZEND_INI_ENTRY3

#define ZEND_INI_ENTRY3 ( name,
default_value,
modifiable,
on_modify,
arg1,
arg2,
arg3 )
Value:
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, NULL)
zval * arg3

Definition at line 156 of file zend_ini.h.

◆ ZEND_INI_ENTRY3_EX

#define ZEND_INI_ENTRY3_EX ( name,
default_value,
modifiable,
on_modify,
arg1,
arg2,
arg3,
displayer )
Value:
{ name, on_modify, arg1, arg2, arg3, default_value, displayer, sizeof(default_value)-1, sizeof(name)-1, modifiable },

Definition at line 153 of file zend_ini.h.

◆ ZEND_INI_ENTRY_EX

#define ZEND_INI_ENTRY_EX ( name,
default_value,
modifiable,
on_modify,
displayer )
Value:
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, NULL, NULL, NULL, displayer)

Definition at line 171 of file zend_ini.h.

◆ ZEND_INI_GET_ADDR

#define ZEND_INI_GET_ADDR ( )
Value:
(ZEND_INI_GET_BASE() + (size_t) mh_arg1)
#define ZEND_INI_GET_BASE()
Definition zend_ini.h:254

Definition at line 259 of file zend_ini.h.

◆ ZEND_INI_GET_BASE

#define ZEND_INI_GET_BASE ( )
Value:
((char *) mh_arg2)

Definition at line 254 of file zend_ini.h.

◆ ZEND_INI_MH

#define ZEND_INI_MH ( name)
Value:
int name(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage)
struct _zend_string zend_string

Definition at line 30 of file zend_ini.h.

◆ ZEND_INI_PARSER_ENTRY

#define ZEND_INI_PARSER_ENTRY   1 /* Normal entry: foo = bar */

Definition at line 244 of file zend_ini.h.

◆ ZEND_INI_PARSER_POP_ENTRY

#define ZEND_INI_PARSER_POP_ENTRY   3 /* Offset entry: foo[] = bar */

Definition at line 246 of file zend_ini.h.

◆ ZEND_INI_PARSER_SECTION

#define ZEND_INI_PARSER_SECTION   2 /* Section: [foobar] */

Definition at line 245 of file zend_ini.h.

◆ ZEND_INI_PERDIR

#define ZEND_INI_PERDIR   (1<<1)

Definition at line 25 of file zend_ini.h.

◆ ZEND_INI_STAGE_ACTIVATE

#define ZEND_INI_STAGE_ACTIVATE   (1<<2)

Definition at line 229 of file zend_ini.h.

◆ ZEND_INI_STAGE_DEACTIVATE

#define ZEND_INI_STAGE_DEACTIVATE   (1<<3)

Definition at line 230 of file zend_ini.h.

◆ ZEND_INI_STAGE_HTACCESS

#define ZEND_INI_STAGE_HTACCESS   (1<<5)

Definition at line 232 of file zend_ini.h.

◆ ZEND_INI_STAGE_IN_REQUEST

◆ ZEND_INI_STAGE_RUNTIME

#define ZEND_INI_STAGE_RUNTIME   (1<<4)

Definition at line 231 of file zend_ini.h.

◆ ZEND_INI_STAGE_SHUTDOWN

#define ZEND_INI_STAGE_SHUTDOWN   (1<<1)

Definition at line 228 of file zend_ini.h.

◆ ZEND_INI_STAGE_STARTUP

#define ZEND_INI_STAGE_STARTUP   (1<<0)

Definition at line 227 of file zend_ini.h.

◆ ZEND_INI_SYSTEM

#define ZEND_INI_SYSTEM   (1<<2)

Definition at line 26 of file zend_ini.h.

◆ ZEND_INI_USER

#define ZEND_INI_USER   (1<<0)

Definition at line 24 of file zend_ini.h.

Typedef Documentation

◆ zend_ini_entry_def

◆ zend_ini_parser_cb_t

typedef void(* zend_ini_parser_cb_t) (zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg)

Definition at line 237 of file zend_ini.h.

◆ zend_ini_parser_param

Function Documentation

◆ display_ini_entries()

ZEND_API void display_ini_entries ( zend_module_entry * module)

Definition at line 116 of file php_ini.c.

◆ zend_alter_ini_entry()

ZEND_API zend_result zend_alter_ini_entry ( zend_string * name,
zend_string * new_value,
int modify_type,
int stage )

Definition at line 325 of file zend_ini.c.

◆ zend_alter_ini_entry_chars()

ZEND_API zend_result zend_alter_ini_entry_chars ( zend_string * name,
const char * value,
size_t value_length,
int modify_type,
int stage )

Definition at line 332 of file zend_ini.c.

◆ zend_alter_ini_entry_chars_ex()

ZEND_API zend_result zend_alter_ini_entry_chars_ex ( zend_string * name,
const char * value,
size_t value_length,
int modify_type,
int stage,
int force_change )

Definition at line 344 of file zend_ini.c.

◆ zend_alter_ini_entry_ex()

ZEND_API zend_result zend_alter_ini_entry_ex ( zend_string * name,
zend_string * new_value,
int modify_type,
int stage,
bool force_change )

Definition at line 356 of file zend_ini.c.

◆ zend_copy_ini_directives()

ZEND_API void zend_copy_ini_directives ( void )

◆ zend_ini_deactivate()

ZEND_API void zend_ini_deactivate ( void )

Definition at line 130 of file zend_ini.c.

◆ ZEND_INI_DISP() [1/3]

ZEND_API ZEND_INI_DISP ( display_link_numbers )

◆ ZEND_INI_DISP() [2/3]

ZEND_API ZEND_INI_DISP ( zend_ini_boolean_displayer_cb )

◆ ZEND_INI_DISP() [3/3]

ZEND_API ZEND_INI_DISP ( zend_ini_color_displayer_cb )

◆ zend_ini_double()

ZEND_API double zend_ini_double ( const char * name,
size_t name_length,
int orig )

Definition at line 464 of file zend_ini.c.

◆ zend_ini_dtor()

ZEND_API void zend_ini_dtor ( HashTable * ini_directives)

Definition at line 116 of file zend_ini.c.

◆ zend_ini_get_value()

ZEND_API zend_string * zend_ini_get_value ( zend_string * name)

Definition at line 560 of file zend_ini.c.

◆ zend_ini_global_shutdown()

ZEND_API void zend_ini_global_shutdown ( void )

Definition at line 123 of file zend_ini.c.

◆ zend_ini_long()

ZEND_API zend_long zend_ini_long ( const char * name,
size_t name_length,
int orig )

Definition at line 447 of file zend_ini.c.

◆ ZEND_INI_MH() [1/8]

ZEND_API ZEND_INI_MH ( OnUpdateBool )

◆ ZEND_INI_MH() [2/8]

ZEND_API ZEND_INI_MH ( OnUpdateLong )

◆ ZEND_INI_MH() [3/8]

ZEND_API ZEND_INI_MH ( OnUpdateLongGEZero )

◆ ZEND_INI_MH() [4/8]

ZEND_API ZEND_INI_MH ( OnUpdateReal )

◆ ZEND_INI_MH() [5/8]

ZEND_API ZEND_INI_MH ( OnUpdateStr )

◆ ZEND_INI_MH() [6/8]

ZEND_API ZEND_INI_MH ( OnUpdateString )

◆ ZEND_INI_MH() [7/8]

ZEND_API ZEND_INI_MH ( OnUpdateStringUnempty )

◆ ZEND_INI_MH() [8/8]

ZEND_API ZEND_INI_MH ( OnUpdateStrNotEmpty )

◆ zend_ini_parse_bool()

ZEND_API bool zend_ini_parse_bool ( zend_string * str)

Definition at line 573 of file zend_ini.c.

◆ zend_ini_parse_quantity()

ZEND_API zend_long zend_ini_parse_quantity ( zend_string * value,
zend_string ** errstr )

Parses an ini quantity

The value parameter must be a string in the form

sign? digits ws* multiplier?

with

sign: [+-]
digit: [0-9]
digits: digit+
ws: [ \t\n\r\v\f]
multiplier: [KMG]

Leading and trailing whitespaces are ignored.

If the string is empty or consists only of only whitespaces, 0 is returned.

Digits is parsed as decimal unless the first digit is '0', in which case digits is parsed as octal.

The multiplier is case-insensitive. K, M, and G multiply the quantity by 2**10, 2**20, and 2**30, respectively.

For backwards compatibility, ill-formatted values are handled as follows:

  • No leading digits: value is treated as '0'
  • Invalid multiplier: multiplier is ignored
  • Invalid characters between digits and multiplier: invalid characters are ignored
  • Integer overflow: The result of the overflow is returned

In any of these cases an error string is stored in *errstr (caller must release it), otherwise *errstr is set to NULL.

Definition at line 857 of file zend_ini.c.

◆ zend_ini_parse_quantity_warn()

ZEND_API zend_long zend_ini_parse_quantity_warn ( zend_string * value,
zend_string * setting )

Definition at line 869 of file zend_ini.c.

◆ zend_ini_parse_uquantity()

ZEND_API zend_ulong zend_ini_parse_uquantity ( zend_string * value,
zend_string ** errstr )

Unsigned variant of zend_ini_parse_quantity

Definition at line 863 of file zend_ini.c.

◆ zend_ini_parse_uquantity_warn()

ZEND_API zend_ulong zend_ini_parse_uquantity_warn ( zend_string * value,
zend_string * setting )

Definition at line 883 of file zend_ini.c.

◆ zend_ini_refresh_caches()

ZEND_API void zend_ini_refresh_caches ( int stage)

◆ zend_ini_register_displayer()

ZEND_API zend_result zend_ini_register_displayer ( const char * name,
uint32_t name_length,
void(* displayer )(zend_ini_entry *ini_entry, int type) )

Definition at line 429 of file zend_ini.c.

◆ zend_ini_shutdown()

ZEND_API void zend_ini_shutdown ( void )

Definition at line 110 of file zend_ini.c.

◆ zend_ini_sort_entries()

ZEND_API void zend_ini_sort_entries ( void )

Definition at line 195 of file zend_ini.c.

◆ zend_ini_startup()

ZEND_API void zend_ini_startup ( void )

Definition at line 99 of file zend_ini.c.

◆ zend_ini_str()

ZEND_API zend_string * zend_ini_str ( const char * name,
size_t name_length,
bool orig )

Definition at line 545 of file zend_ini.c.

◆ zend_ini_str_ex()

ZEND_API zend_string * zend_ini_str_ex ( const char * name,
size_t name_length,
bool orig,
bool * exists )

Definition at line 521 of file zend_ini.c.

◆ zend_ini_string()

ZEND_API char * zend_ini_string ( const char * name,
size_t name_length,
int orig )

Definition at line 505 of file zend_ini.c.

◆ zend_ini_string_ex()

ZEND_API char * zend_ini_string_ex ( const char * name,
size_t name_length,
int orig,
bool * exists )

Definition at line 481 of file zend_ini.c.

◆ zend_parse_ini_file()

ZEND_API zend_result zend_parse_ini_file ( zend_file_handle * fh,
bool unbuffered_errors,
int scanner_mode,
zend_ini_parser_cb_t ini_parser_cb,
void * arg )

◆ zend_parse_ini_string()

ZEND_API zend_result zend_parse_ini_string ( const char * str,
bool unbuffered_errors,
int scanner_mode,
zend_ini_parser_cb_t ini_parser_cb,
void * arg )

◆ zend_register_ini_entries()

ZEND_API zend_result zend_register_ini_entries ( const zend_ini_entry_def * ini_entry,
int module_number )

Definition at line 268 of file zend_ini.c.

◆ zend_register_ini_entries_ex()

ZEND_API zend_result zend_register_ini_entries_ex ( const zend_ini_entry_def * ini_entry,
int module_number,
int module_type )

Definition at line 204 of file zend_ini.c.

◆ zend_restore_ini_entry()

ZEND_API zend_result zend_restore_ini_entry ( zend_string * name,
int stage )

Definition at line 408 of file zend_ini.c.

◆ zend_unregister_ini_entries()

ZEND_API void zend_unregister_ini_entries ( int module_number)

Definition at line 297 of file zend_ini.c.

◆ zend_unregister_ini_entries_ex()

ZEND_API void zend_unregister_ini_entries_ex ( int module_number,
int module_type )

Definition at line 283 of file zend_ini.c.