php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_main.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 | Authors: Andi Gutmans <andi@php.net> |
14 | Zeev Suraski <zeev@php.net> |
15 +----------------------------------------------------------------------+
16 */
17
18#ifndef PHP_MAIN_H
19#define PHP_MAIN_H
20
21#include "zend_globals.h"
22#include "php_globals.h"
23#include "SAPI.h"
24
26
27/* Returns the PHP version the engine was built with. This is useful for
28 * extensions which want to know the version of PHP at run-time, rather than
29 * the version they were built with at compile-time.
30 */
31PHPAPI const char *php_version(void);
32
33/* Returns the PHP version id the engine was built with. This is useful for
34 * extensions which want to know the version of PHP at run-time, rather than
35 * the version they were built with at compile-time.
36 */
37PHPAPI unsigned int php_version_id(void);
38
39/* Prints the PHP version string for the -v option. It's in main/ so that
40 * it can be shared between SAPIs.
41 */
44
46PHPAPI void php_request_shutdown(void *dummy);
50
52
57
59PHPAPI int php_handle_auth_data(const char *auth);
60
61PHPAPI void php_html_puts(const char *str, size_t siz);
63
64/* environment module */
65extern int php_init_environ(void);
66extern int php_shutdown_environ(void);
67
68#ifdef ZTS
69PHPAPI void php_reserve_tsrm_memory(void);
70PHPAPI bool php_tsrm_startup_ex(int expected_threads);
71PHPAPI bool php_tsrm_startup(void);
72
73#define PHP_ZTS 1
74#else
75#define PHP_ZTS 0
76#endif
77
78#ifdef PHP_WIN32
79#define PHP_OS_STR "WINNT"
80#else
81#define PHP_OS_STR PHP_OS
82#endif
83
85
86#endif
SAPI_API sapi_module_struct sapi_module
Definition SAPI.c:65
sapi_globals_struct sapi_globals
Definition SAPI.c:44
struct _sapi_module_struct sapi_module_struct
Definition SAPI.h:60
file(string $filename, int $flags=0, $context=null)
count(Countable|array $value, int $mode=COUNT_NORMAL)
DL_HANDLE handle
Definition ffi.c:3028
void * ptr
Definition ffi.c:3814
char * mode
PHPAPI zend_result php_lint_script(zend_file_handle *file)
Definition main.c:2713
PHPAPI zend_result php_stream_open_for_zend_ex(zend_file_handle *handle, int mode)
Definition main.c:1620
PHPAPI unsigned int php_version_id(void)
Definition main.c:105
void php_request_shutdown(void *dummy)
Definition main.c:1885
PHPAPI bool php_execute_script_ex(zend_file_handle *primary_file, zval *retval)
Definition main.c:2502
zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module)
Definition main.c:2103
PHPAPI char * php_get_version(sapi_module_struct *sapi_module)
Definition main.c:110
PHPAPI void php_handle_aborted_connection(void)
Definition main.c:2656
PHPAPI bool php_execute_script(zend_file_handle *primary_file)
Definition main.c:2613
void php_module_shutdown(void)
Definition main.c:2424
PHPAPI void php_html_puts(const char *str, size_t size)
Definition main.c:1235
PHPAPI void php_print_version(sapi_module_struct *sapi_module)
Definition main.c:144
zend_result php_request_startup(void)
Definition main.c:1801
zend_result php_register_extensions(zend_module_entry *const *ptr, int count)
Definition main.c:2054
PHPAPI const char * php_version(void)
Definition main.c:100
PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval *ret)
Definition main.c:2620
PHPAPI int php_handle_auth_data(const char *auth)
Definition main.c:2669
int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals)
Definition main.c:2416
#define PHPAPI
Definition php.h:71
int php_shutdown_environ(void)
int php_init_environ(void)
struct _zval_struct zval
struct _zend_file_handle zend_file_handle
struct _zend_module_entry zend_module_entry
#define END_EXTERN_C()
#define BEGIN_EXTERN_C()
ZEND_RESULT_CODE zend_result
Definition zend_types.h:64
zval retval
zval * ret