php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
mbstring.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 | Author: Tsukada Takuya <tsukada@fminn.nagano.nagano.jp> |
14 | Hironori Sato <satoh@jpnnet.com> |
15 | Shigeru Kanemoto <sgk@happysize.co.jp> |
16 +----------------------------------------------------------------------+
17 */
18
19#ifndef _MBSTRING_H
20#define _MBSTRING_H
21
22#include "php_version.h"
23#define PHP_MBSTRING_VERSION PHP_VERSION
24
25#ifdef PHP_WIN32
26# undef MBSTRING_API
27# ifdef MBSTRING_EXPORTS
28# define MBSTRING_API __declspec(dllexport)
29# elif defined(COMPILE_DL_MBSTRING)
30# define MBSTRING_API __declspec(dllimport)
31# else
32# define MBSTRING_API /* nothing special */
33# endif
34#elif defined(__GNUC__) && __GNUC__ >= 4
35# undef MBSTRING_API
36# define MBSTRING_API __attribute__ ((visibility("default")))
37#else
38# undef MBSTRING_API
39# define MBSTRING_API /* nothing special */
40#endif
41
43#include "SAPI.h"
44
45#define PHP_MBSTRING_API 20021024
46
48#define phpext_mbstring_ptr &mbstring_module_entry
49
50PHP_MINIT_FUNCTION(mbstring);
52PHP_RINIT_FUNCTION(mbstring);
54PHP_MINFO_FUNCTION(mbstring);
55
56MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes, const mbfl_encoding *enc);
57
59 const char *input, size_t length,
60 const mbfl_encoding *to_encoding, const mbfl_encoding *from_encoding);
62 const char *input, size_t length, const mbfl_encoding *to_encoding,
63 const mbfl_encoding **from_encodings, size_t num_from_encodings);
64
65MBSTRING_API size_t php_mb_mbchar_bytes(const char *s, const mbfl_encoding *enc);
66
67MBSTRING_API size_t php_mb_stripos(bool mode, zend_string *haystack, zend_string *needle, zend_long offset, const mbfl_encoding *enc);
68MBSTRING_API bool php_mb_check_encoding(const char *input, size_t length, const mbfl_encoding *encoding);
69
70MBSTRING_API const mbfl_encoding* mb_guess_encoding_for_strings(const unsigned char **strings, size_t *str_lengths, size_t n, const mbfl_encoding **elist, unsigned int elist_size, bool strict, bool order_significant);
71
101 unsigned int outconv_state;
103#ifdef HAVE_MBREGEX
104 struct _zend_mb_regex_globals *mb_regex_globals;
105 zend_long regex_stack_limit;
106#endif
109 /* Whether an explicit internal_encoding / http_output / http_input encoding was set. */
113#ifdef HAVE_MBREGEX
114 zend_long regex_retry_limit;
115#endif
117
118#define MBSTRG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mbstring, v)
119
120#if defined(ZTS) && defined(COMPILE_DL_MBSTRING)
122#endif
123
124#endif /* _MBSTRING_H */
char s[4]
Definition cdf.c:77
zend_long n
Definition ffi.c:4979
zend_long offset
char * mode
mbfl_no_encoding
mbfl_no_language
zend_module_entry mbstring_module_entry
Definition mbstring.c:198
MBSTRING_API size_t php_mb_mbchar_bytes(const char *s, const mbfl_encoding *enc)
Definition mbstring.c:5994
MBSTRING_API char * php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes, const mbfl_encoding *enc)
Definition mbstring.c:6010
#define MBSTRING_API
Definition mbstring.h:39
int filter_illegal_mode
Definition mbstring.h:92
size_t http_input_list_size
Definition mbstring.h:84
size_t current_detect_order_list_size
Definition mbstring.h:88
zend_string * last_used_encoding_name
Definition mbstring.h:107
uint32_t filter_illegal_substchar
Definition mbstring.h:93
enum mbfl_no_language language
Definition mbstring.h:96
const mbfl_encoding ** current_detect_order_list
Definition mbstring.h:87
MBSTRING_API const mbfl_encoding * mb_guess_encoding_for_strings(const unsigned char **strings, size_t *str_lengths, size_t n, const mbfl_encoding **elist, unsigned int elist_size, bool strict, bool order_significant)
Definition mbstring.c:3360
const mbfl_encoding ** http_input_list
Definition mbstring.h:83
const mbfl_encoding * internal_encoding
Definition mbstring.h:74
const mbfl_encoding ** detect_order_list
Definition mbstring.h:85
size_t detect_order_list_size
Definition mbstring.h:86
uint32_t current_filter_illegal_substchar
Definition mbstring.h:95
MBSTRING_API size_t php_mb_stripos(bool mode, zend_string *haystack, zend_string *needle, zend_long offset, const mbfl_encoding *enc)
Definition mbstring.c:6049
MBSTRING_API bool php_mb_check_encoding(const char *input, size_t length, const mbfl_encoding *encoding)
Definition mbstring.c:4872
const mbfl_encoding * http_output_encoding
Definition mbstring.h:76
const mbfl_encoding * http_input_identify_string
Definition mbstring.h:82
MBSTRING_API zend_string * php_mb_convert_encoding_ex(const char *input, size_t length, const mbfl_encoding *to_encoding, const mbfl_encoding *from_encoding)
Definition mbstring.c:2710
int current_filter_illegal_mode
Definition mbstring.h:94
MBSTRING_API zend_string * php_mb_convert_encoding(const char *input, size_t length, const mbfl_encoding *to_encoding, const mbfl_encoding **from_encodings, size_t num_from_encodings)
Definition mbstring.c:2718
const mbfl_encoding * http_input_identify_post
Definition mbstring.h:80
HashTable * all_encodings_list
Definition mbstring.h:91
bool outconv_enabled
Definition mbstring.h:100
void * http_output_conv_mimetypes
Definition mbstring.h:102
char * internal_encoding_name
Definition mbstring.h:73
const mbfl_encoding * current_internal_encoding
Definition mbstring.h:75
const mbfl_encoding * http_input_identify
Definition mbstring.h:78
size_t illegalchars
Definition mbstring.h:99
enum mbfl_no_encoding * default_detect_order_list
Definition mbstring.h:89
bool http_input_set
Definition mbstring.h:112
bool http_output_set
Definition mbstring.h:111
bool internal_encoding_set
Definition mbstring.h:110
const mbfl_encoding * last_used_encoding
Definition mbstring.h:108
size_t default_detect_order_list_size
Definition mbstring.h:90
const mbfl_encoding * current_http_output_encoding
Definition mbstring.h:77
bool strict_detection
Definition mbstring.h:98
bool encoding_translation
Definition mbstring.h:97
const mbfl_encoding * http_input_identify_get
Definition mbstring.h:79
const mbfl_encoding * http_input_identify_cookie
Definition mbstring.h:81
unsigned int outconv_state
Definition mbstring.h:101
#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
xmlCharEncodingHandlerPtr encoding
Definition php_soap.h:170
#define ZEND_TSRMLS_CACHE_EXTERN()
Definition zend.h:67
#define ZEND_END_MODULE_GLOBALS(module_name)
Definition zend_API.h:248
#define ZEND_BEGIN_MODULE_GLOBALS(module_name)
Definition zend_API.h:246
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