php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_ini.c File Reference
#include "zend.h"
#include "zend_sort.h"
#include "zend_API.h"
#include "zend_ini.h"
#include "zend_alloc.h"
#include "zend_operators.h"
#include "zend_strtod.h"
#include "zend_modules.h"
#include "zend_smart_str.h"
#include <ctype.h>

Go to the source code of this file.

Macros

#define NO_VALUE_PLAINTEXT   "no value"
 
#define NO_VALUE_HTML   "<i>no value</i>"
 

Enumerations

enum  zend_ini_parse_quantity_signed_result_t { ZEND_INI_PARSE_QUANTITY_SIGNED , ZEND_INI_PARSE_QUANTITY_UNSIGNED }
 

Functions

ZEND_API void zend_ini_startup (void)
 
ZEND_API void zend_ini_shutdown (void)
 
ZEND_API void zend_ini_dtor (HashTable *ini_directives)
 
ZEND_API void zend_ini_global_shutdown (void)
 
ZEND_API void zend_ini_deactivate (void)
 
ZEND_API void zend_ini_sort_entries (void)
 
ZEND_API zend_result zend_register_ini_entries_ex (const zend_ini_entry_def *ini_entry, int module_number, int module_type)
 
ZEND_API zend_result zend_register_ini_entries (const zend_ini_entry_def *ini_entry, int module_number)
 
ZEND_API void zend_unregister_ini_entries_ex (int module_number, int module_type)
 
ZEND_API void zend_unregister_ini_entries (int module_number)
 
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_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_alter_ini_entry_ex (zend_string *name, zend_string *new_value, int modify_type, int stage, bool force_change)
 
ZEND_API zend_result zend_restore_ini_entry (zend_string *name, int stage)
 
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_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_ex (const char *name, size_t name_length, int orig, bool *exists)
 
ZEND_API char * zend_ini_string (const char *name, size_t name_length, int orig)
 
ZEND_API zend_stringzend_ini_str_ex (const char *name, size_t name_length, bool orig, bool *exists)
 
ZEND_API zend_stringzend_ini_str (const char *name, size_t name_length, bool orig)
 
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)
 
 if (type==ZEND_INI_DISPLAY_ORIG &&ini_entry->modified)
 
else if (ini_entry->value)
 
 if (tmp_value)
 
 if (value)
 

Variables

zend_stringtmp_value
 
 else
 

Macro Definition Documentation

◆ NO_VALUE_HTML

#define NO_VALUE_HTML   "<i>no value</i>"

Definition at line 33 of file zend_ini.c.

◆ NO_VALUE_PLAINTEXT

#define NO_VALUE_PLAINTEXT   "no value"

Definition at line 32 of file zend_ini.c.

Enumeration Type Documentation

◆ zend_ini_parse_quantity_signed_result_t

Enumerator
ZEND_INI_PARSE_QUANTITY_SIGNED 
ZEND_INI_PARSE_QUANTITY_UNSIGNED 

Definition at line 585 of file zend_ini.c.

Function Documentation

◆ if() [1/4]

else if ( ini_entry-> value)

Definition at line 904 of file zend_ini.c.

◆ if() [2/4]

if ( tmp_value )

Definition at line 910 of file zend_ini.c.

◆ if() [3/4]

if ( type = ZEND_INI_DISPLAY_ORIG && ini_entry->modified)

Definition at line 902 of file zend_ini.c.

◆ if() [4/4]

if ( value )

Definition at line 916 of file zend_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_ini_deactivate()

ZEND_API void zend_ini_deactivate ( void )

Definition at line 130 of file zend_ini.c.

◆ 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_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_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_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.

Variable Documentation

◆ else

else
Initial value:
{
#define NULL
Definition gdcache.h:45
zend_string * tmp_value
Definition zend_ini.c:900

Definition at line 906 of file zend_ini.c.

◆ tmp_value

zend_string* tmp_value
Initial value:
{
int value
value

Definition at line 900 of file zend_ini.c.