2015-01-03 09:22:58 +00:00
|
|
|
/*
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2019-01-30 09:00:23 +00:00
|
|
|
| Copyright (c) The PHP Group |
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2000-07-24 01:40:02 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2000-07-24 01:40:02 +00:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2011-10-19 10:09:24 +00:00
|
|
|
| Author: Jani Lehtimäki <jkl@njet.net> |
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 01:40:02 +00:00
|
|
|
*/
|
1999-04-17 00:37:12 +00:00
|
|
|
|
2000-07-03 00:41:19 +00:00
|
|
|
#ifndef PHP_VAR_H
|
|
|
|
#define PHP_VAR_H
|
1999-04-17 00:37:12 +00:00
|
|
|
|
2010-05-26 07:24:37 +00:00
|
|
|
#include "ext/standard/basic_functions.h"
|
2014-09-20 20:42:02 +00:00
|
|
|
#include "zend_smart_str_public.h"
|
2001-08-03 07:25:27 +00:00
|
|
|
|
2019-09-24 09:50:26 +00:00
|
|
|
PHP_MINIT_FUNCTION(var);
|
1999-04-17 00:37:12 +00:00
|
|
|
|
2014-12-13 22:06:14 +00:00
|
|
|
PHPAPI void php_var_dump(zval *struc, int level);
|
|
|
|
PHPAPI void php_var_export(zval *struc, int level);
|
|
|
|
PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf);
|
2010-07-09 21:11:37 +00:00
|
|
|
|
2014-12-13 22:06:14 +00:00
|
|
|
PHPAPI void php_debug_zval_dump(zval *struc, int level);
|
2000-10-30 17:10:06 +00:00
|
|
|
|
2014-09-21 21:42:55 +00:00
|
|
|
typedef struct php_serialize_data *php_serialize_data_t;
|
|
|
|
typedef struct php_unserialize_data *php_unserialize_data_t;
|
2001-11-10 21:18:34 +00:00
|
|
|
|
2014-12-13 22:06:14 +00:00
|
|
|
PHPAPI void php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t *data);
|
|
|
|
PHPAPI int php_var_unserialize(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash);
|
|
|
|
PHPAPI int php_var_unserialize_ref(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash);
|
|
|
|
PHPAPI int php_var_unserialize_intern(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash);
|
2000-10-30 17:10:06 +00:00
|
|
|
|
2016-08-10 10:51:48 +00:00
|
|
|
PHPAPI php_serialize_data_t php_var_serialize_init(void);
|
|
|
|
PHPAPI void php_var_serialize_destroy(php_serialize_data_t d);
|
|
|
|
PHPAPI php_unserialize_data_t php_var_unserialize_init(void);
|
|
|
|
PHPAPI void php_var_unserialize_destroy(php_unserialize_data_t d);
|
2016-09-06 10:59:35 +00:00
|
|
|
PHPAPI HashTable *php_var_unserialize_get_allowed_classes(php_unserialize_data_t d);
|
2016-09-06 02:56:36 +00:00
|
|
|
PHPAPI void php_var_unserialize_set_allowed_classes(php_unserialize_data_t d, HashTable *classes);
|
2019-09-24 09:50:26 +00:00
|
|
|
PHPAPI void php_var_unserialize_set_max_depth(php_unserialize_data_t d, zend_long max_depth);
|
|
|
|
PHPAPI zend_long php_var_unserialize_get_max_depth(php_unserialize_data_t d);
|
|
|
|
PHPAPI void php_var_unserialize_set_cur_depth(php_unserialize_data_t d, zend_long cur_depth);
|
|
|
|
PHPAPI zend_long php_var_unserialize_get_cur_depth(php_unserialize_data_t d);
|
2016-08-10 10:51:48 +00:00
|
|
|
|
2014-09-21 21:42:55 +00:00
|
|
|
#define PHP_VAR_SERIALIZE_INIT(d) \
|
2016-08-10 10:51:48 +00:00
|
|
|
(d) = php_var_serialize_init()
|
2000-10-30 17:10:06 +00:00
|
|
|
|
2014-09-21 21:42:55 +00:00
|
|
|
#define PHP_VAR_SERIALIZE_DESTROY(d) \
|
2016-08-10 10:51:48 +00:00
|
|
|
php_var_serialize_destroy(d)
|
2010-05-26 07:24:37 +00:00
|
|
|
|
2014-09-21 21:42:55 +00:00
|
|
|
#define PHP_VAR_UNSERIALIZE_INIT(d) \
|
2016-08-10 10:51:48 +00:00
|
|
|
(d) = php_var_unserialize_init()
|
2010-05-26 07:24:37 +00:00
|
|
|
|
2014-09-21 21:42:55 +00:00
|
|
|
#define PHP_VAR_UNSERIALIZE_DESTROY(d) \
|
2016-08-10 10:51:48 +00:00
|
|
|
php_var_unserialize_destroy(d)
|
1999-04-17 00:37:12 +00:00
|
|
|
|
2020-07-07 22:47:52 +00:00
|
|
|
PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, const size_t buf_len, HashTable *options, const char* function_name);
|
|
|
|
|
2014-04-10 14:08:11 +00:00
|
|
|
PHPAPI void var_replace(php_unserialize_data_t *var_hash, zval *ozval, zval *nzval);
|
2014-02-14 09:40:11 +00:00
|
|
|
PHPAPI void var_push_dtor(php_unserialize_data_t *var_hash, zval *val);
|
2015-08-05 06:41:00 +00:00
|
|
|
PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx);
|
2002-08-04 23:45:38 +00:00
|
|
|
PHPAPI void var_destroy(php_unserialize_data_t *var_hash);
|
2015-01-03 09:22:58 +00:00
|
|
|
|
2000-07-03 00:41:19 +00:00
|
|
|
#endif /* PHP_VAR_H */
|