mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00

Add a C function, opcache_preloading(), that returns true during preloading. Extensions can use this to detect preloading, not only during compilation/execution, but also in RINIT()/RSHUTDOWN(). Since opcache currently doesn't install any header, I'm adding a new one: zend_accelerator_api.h. Header name is based on other files in ext/opcache. Closes GH-19288
29 lines
1.2 KiB
C
29 lines
1.2 KiB
C
/*
|
|
+----------------------------------------------------------------------+
|
|
| Zend OPcache |
|
|
+----------------------------------------------------------------------+
|
|
| Copyright (c) The PHP Group |
|
|
+----------------------------------------------------------------------+
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
|
| that is bundled with this package in the file LICENSE, and is |
|
|
| available through the world-wide-web at the following url: |
|
|
| https://www.php.net/license/3_01.txt |
|
|
| 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. |
|
|
+----------------------------------------------------------------------+
|
|
*/
|
|
|
|
#ifndef ZEND_ACCELERATOR_API_H
|
|
#define ZEND_ACCELERATOR_API_H
|
|
|
|
#include "Zend/zend_portability.h"
|
|
|
|
BEGIN_EXTERN_C()
|
|
|
|
/* Returns true during preloading */
|
|
ZEND_API bool opcache_preloading(void);
|
|
|
|
END_EXTERN_C()
|
|
|
|
#endif /* ZEND_ACCELERATOR_API_H */
|