php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_embed.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: Edin Kadribasic <edink@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef _PHP_EMBED_H_
18#define _PHP_EMBED_H_
19
20#include <main/php.h>
21#include <main/SAPI.h>
22#include <main/php_main.h>
23#include <main/php_variables.h>
24#include <main/php_ini.h>
25#include <zend_ini.h>
26
27#define PHP_EMBED_START_BLOCK(x,y) { \
28 php_embed_init(x, y); \
29 zend_first_try {
30
31#define PHP_EMBED_END_BLOCK() \
32 } zend_catch { \
33 /* int exit_status = EG(exit_status); */ \
34 } zend_end_try(); \
35 php_embed_shutdown(); \
36}
37
38#ifndef PHP_WIN32
39 #define EMBED_SAPI_API SAPI_API
40#else
41 #define EMBED_SAPI_API
42#endif
43
44#ifdef ZTS
46#endif
47
49EMBED_SAPI_API int php_embed_init(int argc, char **argv);
53
54
55#endif /* _PHP_EMBED_H_ */
struct _sapi_module_struct sapi_module_struct
Definition SAPI.h:60
EMBED_SAPI_API void php_embed_shutdown(void)
Definition php_embed.c:252
EMBED_SAPI_API sapi_module_struct php_embed_module
Definition php_embed.c:125
EMBED_SAPI_API int php_embed_init(int argc, char **argv)
Definition php_embed.c:163
#define EMBED_SAPI_API
Definition php_embed.h:39
#define ZEND_TSRMLS_CACHE_EXTERN()
Definition zend.h:67
#define END_EXTERN_C()
#define BEGIN_EXTERN_C()