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: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | 14 | Zeev Suraski <zeev@php.net> | 15 +----------------------------------------------------------------------+ 16 */ 17 18 #ifndef PHP_VARIABLES_H 19 #define PHP_VARIABLES_H 20 21 #include "php.h" 22 #include "SAPI.h" 23 24 #define PARSE_POST 0 25 #define PARSE_GET 1 26 #define PARSE_COOKIE 2 27 #define PARSE_STRING 3 28 #define PARSE_ENV 4 29 #define PARSE_SERVER 5 30 31 BEGIN_EXTERN_C() 32 void php_startup_auto_globals(void); 33 extern PHPAPI void (*php_import_environment_variables)(zval *array_ptr); 34 extern PHPAPI void (*php_load_environment_variables)(zval *array_ptr); 35 PHPAPI void php_register_variable(const char *var, const char *val, zval *track_vars_array); 36 /* binary-safe version */ 37 PHPAPI void php_register_variable_safe(const char *var, const char *val, size_t val_len, zval *track_vars_array); 38 PHPAPI void php_register_variable_ex(const char *var, zval *val, zval *track_vars_array); 39 PHPAPI void php_register_known_variable(const char *var, size_t var_len, zval *value, zval *track_vars_array); 40 41 PHPAPI void php_build_argv(const char *s, zval *track_vars_array); 42 PHPAPI int php_hash_environment(void); 43 END_EXTERN_C() 44 45 #define NUM_TRACK_VARS 6 46 47 #endif /* PHP_VARIABLES_H */ 48