27#ifdef PHAR_HAVE_OPENSSL
29#include <openssl/evp.h>
30#include <openssl/x509.h>
31#include <openssl/x509v3.h>
32#include <openssl/crypto.h>
33#include <openssl/pem.h>
34#include <openssl/err.h>
35#include <openssl/conf.h>
36#include <openssl/rand.h>
37#include <openssl/ssl.h>
38#include <openssl/pkcs12.h>
40static int phar_call_openssl_signverify(
int is_sign,
php_stream *fp,
zend_off_t end,
char *
key,
size_t key_len,
char **signature,
size_t *signature_len, uint32_t sig_type);
50 if (entry->
link[0] ==
'/') {
72 link = phar_get_link_location(entry);
99 if (follow_links && entry->
link) {
102 if (link_entry && link_entry != entry) {
107 if (phar_get_fp_type(entry) ==
PHAR_FP) {
108 if (!phar_get_entrypfp(entry)) {
112 return phar_get_entrypfp(entry);
113 }
else if (phar_get_fp_type(entry) ==
PHAR_UFP) {
114 return phar_get_entrypufp(entry);
161 eoffset = phar_get_fp_offset(entry);
168 temp = eoffset + position +
offset;
181 if (temp < eoffset) {
201 if (path_len >=
sizeof(
".phar")-1 && !memcmp(path,
".phar",
sizeof(
".phar")-1)) {
206 is_phar = (
filename_len > 7 && !memcmp(filename,
"phar://", 7));
211 phar_unixify_path_separators(entry.
filename, path_len);
222 filename = entry.
tmp;
241 if (ssb.
sb.st_mode & S_IFDIR) {
269 char *path, *arch, *entry, *
test;
270 size_t arch_len, entry_len;
289 size_t length_phar_protocol =
strlen(
"phar://");
293 && is_file_a_phar_wrapper
325 if (zend_hash_str_exists(&(phar->
manifest),
test + 1, try_len - 1)) {
332 if (zend_hash_str_exists(&(phar->
manifest),
test, try_len)) {
356 *pphar = zend_hash_str_find_ptr(&
cached_phars, arch, arch_len);
401 spprintf(
error, 0,
"phar error: unable to create temporary file");
435 spprintf(
error, 0,
"phar error: unable to create temporary file");
447 spprintf(
error, 4096,
"phar error: cannot separate entry file \"%s\" contents in phar archive \"%s\" for write access", entry->
filename, entry->
phar->
fname);
478 bool for_write =
mode[0] !=
'r' ||
mode[1] ==
'+';
479 bool for_append =
mode[0] ==
'a';
480 bool for_create =
mode[0] !=
'r';
481 bool for_trunc =
mode[0] ==
'w';
499 spprintf(
error, 4096,
"phar error: file \"%s\" in phar \"%s\" cannot be opened for writing, disabled by ini setting", path, fname);
506 spprintf(
error, 4096,
"phar error: file \"\" in phar \"%s\" must not be empty", fname);
530 spprintf(
error, 4096,
"phar error: file \"%s\" in phar \"%s\" cannot be opened for writing, could not make cached phar writeable", path, fname);
534 goto really_get_entry;
540 spprintf(
error, 4096,
"phar error: file \"%s\" in phar \"%s\" cannot be opened for reading, writable file pointers are open", path, fname);
547 spprintf(
error, 4096,
"phar error: file \"%s\" in phar \"%s\" cannot be opened for writing, readable file pointers are open", path, fname);
561 (*ret)->position = 0;
564 (*ret)->internal_file = entry;
576 if (
FAILURE == phar_create_writeable_entry(phar, entry,
error)) {
579 }
else if (for_append) {
591 if (
FAILURE == phar_create_writeable_entry(phar, entry,
error)) {
607 (*ret)->position = 0;
609 (*ret)->internal_file = entry;
617 (*ret)->zero = phar_get_fp_offset(
link);
619 (*ret)->zero = phar_get_fp_offset(entry);
639 const char *pcr_error;
643 phar_unixify_path_separators(path, path_len);
646 is_dir = (path_len && path[path_len - 1] ==
'/') ? 1 : 0;
660 spprintf(
error, 0,
"phar error: invalid path \"%s\" contains %s", path, pcr_error);
667 spprintf(
error, 4096,
"phar error: file \"%s\" in phar \"%s\" cannot be created, could not make cached phar writeable", path, fname);
683 spprintf(
error, 0,
"phar error: unable to create temporary file");
691 if (allow_dir == 2) {
735 ret->position =
ret->zero = 0;
736 ret->internal_file = entry;
755 if (phar_get_pharfp(phar)) {
765 if (!phar_get_pharfp(phar)) {
793 spprintf(
error, 0,
"phar error: unable to create temporary file");
851 if (follow_links && entry->
link) {
853 if (link_entry && link_entry != entry) {
874 if (!phar_get_pharfp(phar)) {
876 spprintf(
error, 4096,
"phar error: Cannot open phar archive \"%s\" for reading", phar->
fname);
885 dummy.
fp = phar_get_pharfp(phar);
892 if (!phar_get_entrypufp(entry)) {
894 if (!phar_get_entrypufp(entry)) {
895 spprintf(
error, 4096,
"phar error: Cannot open temporary file for decompressing phar archive \"%s\" file \"%s\"", phar->
fname, entry->
filename);
903 dummy.
fp = phar_get_pharfp(phar);
908 ufp = phar_get_entrypufp(entry);
930 spprintf(
error, 4096,
"phar error: internal corruption of phar \"%s\" (actual filesize mismatch on file \"%s\")", phar->
fname, entry->
filename);
941 spprintf(
error, 4096,
"phar error: internal corruption of phar \"%s\" (actual filesize mismatch on file \"%s\")", phar->
fname, entry->
filename);
948 phar_set_fp_type(entry,
PHAR_UFP, loc);
982 *filename = fd_ptr->
fname;
1016 char *my_realpath, *save;
1029 if (alias && alias_len) {
1033 spprintf(
error, 0,
"alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias,
PHAR_G(
last_phar)->fname, fname);
1057 if (alias && alias_len) {
1062 spprintf(
error, 0,
"alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias, fd_ptr->
fname, fname);
1091 save_len = fname_len;
1093 if (fname && fname_len) {
1098 if (alias && alias_len) {
1099 if (!
fd->is_temporary_alias && (alias_len !=
fd->alias_len || memcmp(
fd->alias, alias, alias_len))) {
1101 spprintf(
error, 0,
"alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias, fd_ptr->
fname, fname);
1128 if (!
fd->is_temporary_alias && alias && alias_len) {
1129 if (alias_len !=
fd->alias_len || memcmp(
fd->alias, alias, alias_len)) {
1131 spprintf(
error, 0,
"alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias, fd_ptr->
fname, fname);
1147 fd = *archive = fd_ptr;
1159 fd = *archive = fd_ptr;
1174 fname_len =
strlen(my_realpath);
1175 fname = my_realpath;
1180 phar_unixify_path_separators(fname, fname_len);
1188 if (alias && alias_len) {
1204 goto realpath_success;
1221 return "zlib.deflate";
1223 return "bzip2.compress";
1225 return return_unknown ?
"unknown" :
NULL;
1245 return "zlib.inflate";
1247 return "bzip2.decompress";
1249 return return_unknown ?
"unknown" :
NULL;
1269 const char *pcr_error;
1274 phar_unixify_path_separators(path, path_len);
1277 is_dir = (path_len && (path[path_len - 1] ==
'/')) ? 1 : 0;
1283 if (security && path_len >=
sizeof(
".phar")-1 && !memcmp(path,
".phar",
sizeof(
".phar")-1)) {
1285 spprintf(
error, 4096,
"phar error: cannot directly access magic \".phar\" directory or files within it");
1290 if (!path_len && !
dir) {
1292 spprintf(
error, 4096,
"phar error: invalid path \"%s\" must not be empty", path);
1299 spprintf(
error, 4096,
"phar error: invalid path \"%s\" contains %s", path, pcr_error);
1309 if (path_len <= 1) {
1315 if (
NULL != (entry = zend_hash_str_find_ptr(&phar->
manifest, path, path_len))) {
1322 spprintf(
error, 4096,
"phar error: path \"%s\" is a directory", path);
1329 spprintf(
error, 4096,
"phar error: path \"%s\" exists and is a not a directory", path);
1337 if (zend_hash_str_exists(&phar->
virtual_dirs, path, path_len)) {
1360 if (
NULL == (entry = zend_hash_find_ptr(&phar->
manifest, str_key))) {
1362 spprintf(
error, 4096,
"phar internal error: mounted path \"%s\" could not be retrieved from manifest",
ZSTR_VAL(str_key));
1369 spprintf(
error, 4096,
"phar internal error: mounted path \"%s\" is not properly initialized as a mounted path",
ZSTR_VAL(str_key));
1381 if ((ssb.
sb.st_mode & S_IFDIR) && !
dir) {
1384 spprintf(
error, 4096,
"phar error: path \"%s\" is a directory", path);
1389 if ((ssb.
sb.st_mode & S_IFDIR) == 0 &&
dir) {
1393 spprintf(
error, 4096,
"phar error: path \"%s\" exists and is a not a directory", path);
1402 spprintf(
error, 4096,
"phar error: path \"%s\" exists as file \"%s\" and could not be mounted", path,
test);
1409 if (
NULL == (entry = zend_hash_str_find_ptr(&phar->
manifest, path, path_len))) {
1411 spprintf(
error, 4096,
"phar error: path \"%s\" exists as file \"%s\" and could not be retrieved after being mounted", path,
test);
1424static const char hexChars[] =
"0123456789ABCDEF";
1426static int phar_hex_str(
const char *digest,
size_t digest_len,
char **signature)
1433 for (;
len < digest_len; ++
len) {
1434 (*signature)[++
pos] = hexChars[((
const unsigned char *)digest)[
len] >> 4];
1435 (*signature)[++
pos] = hexChars[((
const unsigned char *)digest)[
len] & 0x0F];
1437 (*signature)[++
pos] =
'\0';
1442#ifndef PHAR_HAVE_OPENSSL
1443static int phar_call_openssl_signverify(
int is_sign,
php_stream *fp,
zend_off_t end,
char *
key,
size_t key_len,
char **signature,
size_t *signature_len, uint32_t sig_type)
1450 ZVAL_STRINGL(&openssl, is_sign ?
"openssl_sign" :
"openssl_verify", is_sign ?
sizeof(
"openssl_sign")-1 :
sizeof(
"openssl_verify")-1);
1451 if (*signature_len) {
1474 zval_ptr_dtor_str(&zp[0]);
1475 zval_ptr_dtor_str(&zp[1]);
1476 zval_ptr_dtor_str(&zp[2]);
1477 zval_ptr_dtor_str(&openssl);
1482 zval_ptr_dtor_str(&zp[0]);
1483 zval_ptr_dtor_str(&zp[1]);
1484 zval_ptr_dtor_str(&zp[2]);
1485 zval_ptr_dtor_str(&openssl);
1502 zval_ptr_dtor_str(&zp[0]);
1504 zval_ptr_dtor_str(&zp[2]);
1505 zval_ptr_dtor_str(&openssl);
1509 zval_ptr_dtor_str(&openssl);
1519 zval_ptr_dtor_str(&zp[0]);
1520 zval_ptr_dtor_str(&zp[2]);
1545 size_t read_size,
len;
1547 unsigned char buf[1024];
1555#ifdef PHAR_HAVE_OPENSSL
1558 const EVP_MD *mdtype;
1562 mdtype = EVP_sha512();
1564 mdtype = EVP_sha256();
1566 mdtype = EVP_sha1();
1574#ifndef PHAR_HAVE_OPENSSL
1575 if (!zend_hash_str_exists(&
module_registry,
"openssl",
sizeof(
"openssl")-1)) {
1583 spprintf(&pfile, 0,
"%s.pubkey", fname);
1598#ifndef PHAR_HAVE_OPENSSL
1601 if (
FAILURE == phar_call_openssl_signverify(0, fp, end_of_phar,
ZSTR_VAL(pubkey),
ZSTR_LEN(pubkey), &sig, &tempsig, sig_type)) {
1605 spprintf(
error, 0,
"openssl signature could not be verified");
1620 spprintf(
error, 0,
"openssl signature could not be processed");
1631 spprintf(
error, 0,
"openssl signature could not be processed");
1636 md_ctx = EVP_MD_CTX_create();
1637 if (!md_ctx || !EVP_VerifyInit(md_ctx, mdtype)) {
1639 EVP_MD_CTX_destroy(md_ctx);
1642 spprintf(
error, 0,
"openssl signature could not be verified");
1646 read_len = end_of_phar;
1648 if ((
size_t)read_len >
sizeof(
buf)) {
1649 read_size =
sizeof(
buf);
1651 read_size = (size_t)read_len;
1662 if (read_len < read_size) {
1663 read_size = (size_t)read_len;
1667 if (EVP_VerifyFinal(md_ctx, (
unsigned char *)sig, sig_len,
key) != 1) {
1671 EVP_MD_CTX_destroy(md_ctx);
1681 EVP_MD_CTX_destroy(md_ctx);
1684 *signature_len = phar_hex_str((
const char*)sig, sig_len, signature);
1688 unsigned char digest[64];
1691 if (sig_len <
sizeof(digest)) {
1699 read_len = end_of_phar;
1701 if ((
size_t)read_len >
sizeof(
buf)) {
1702 read_size =
sizeof(
buf);
1704 read_size = (size_t)read_len;
1710 if ((
size_t)read_len < read_size) {
1711 read_size = (size_t)read_len;
1717 if (memcmp(digest, sig,
sizeof(digest))) {
1724 *signature_len = phar_hex_str((
const char*)digest,
sizeof(digest), signature);
1728 unsigned char digest[32];
1731 if (sig_len <
sizeof(digest)) {
1739 read_len = end_of_phar;
1741 if ((
size_t)read_len >
sizeof(
buf)) {
1742 read_size =
sizeof(
buf);
1744 read_size = (size_t)read_len;
1750 if ((
size_t)read_len < read_size) {
1751 read_size = (size_t)read_len;
1757 if (memcmp(digest, sig,
sizeof(digest))) {
1764 *signature_len = phar_hex_str((
const char*)digest,
sizeof(digest), signature);
1768 unsigned char digest[20];
1771 if (sig_len <
sizeof(digest)) {
1779 read_len = end_of_phar;
1781 if ((
size_t)read_len >
sizeof(
buf)) {
1782 read_size =
sizeof(
buf);
1784 read_size = (size_t)read_len;
1790 if ((
size_t)read_len < read_size) {
1791 read_size = (size_t)read_len;
1797 if (memcmp(digest, sig,
sizeof(digest))) {
1804 *signature_len = phar_hex_str((
const char*)digest,
sizeof(digest), signature);
1808 unsigned char digest[16];
1811 if (sig_len <
sizeof(digest)) {
1819 read_len = end_of_phar;
1821 if ((
size_t)read_len >
sizeof(
buf)) {
1822 read_size =
sizeof(
buf);
1824 read_size = (size_t)read_len;
1830 if ((
size_t)read_len < read_size) {
1831 read_size = (size_t)read_len;
1837 if (memcmp(digest, sig,
sizeof(digest))) {
1844 *signature_len = phar_hex_str((
const char*)digest,
sizeof(digest), signature);
1859 unsigned char buf[1024];
1871 unsigned char digest[64];
1881 *signature =
estrndup((
char *) digest, 64);
1882 *signature_length = 64;
1889 unsigned char digest[32];
1899 *signature =
estrndup((
char *) digest, 32);
1900 *signature_length = 32;
1906 unsigned char *sigbuf;
1907#ifdef PHAR_HAVE_OPENSSL
1908 unsigned int siglen;
1912 const EVP_MD *mdtype;
1915 mdtype = EVP_sha512();
1917 mdtype = EVP_sha256();
1919 mdtype = EVP_sha1();
1926 spprintf(
error, 0,
"unable to write to phar \"%s\" with requested openssl signature", phar->
fname);
1941 md_ctx = EVP_MD_CTX_create();
1942 if (md_ctx ==
NULL) {
1945 spprintf(
error, 0,
"unable to initialize openssl signature for phar \"%s\"", phar->
fname);
1950 siglen = EVP_PKEY_size(
key);
1953 if (!EVP_SignInit(md_ctx, mdtype)) {
1957 spprintf(
error, 0,
"unable to initialize openssl signature for phar \"%s\"", phar->
fname);
1963 if (!EVP_SignUpdate(md_ctx,
buf, sig_len)) {
1967 spprintf(
error, 0,
"unable to update the openssl signature for phar \"%s\"", phar->
fname);
1973 if (!EVP_SignFinal (md_ctx, sigbuf, &siglen,
key)) {
1977 spprintf(
error, 0,
"unable to write phar \"%s\" with requested openssl signature", phar->
fname);
1982 sigbuf[siglen] =
'\0';
1984 EVP_MD_CTX_destroy(md_ctx);
1993 spprintf(
error, 0,
"unable to write phar \"%s\" with requested openssl signature", phar->
fname);
1998 *signature = (
char *) sigbuf;
1999 *signature_length = siglen;
2003 unsigned char digest[20];
2013 *signature =
estrndup((
char *) digest, 20);
2014 *signature_length = 20;
2018 unsigned char digest[16];
2028 *signature =
estrndup((
char *) digest, 16);
2029 *signature_length = 16;
2034 phar->
sig_len = phar_hex_str((
const char *)*signature, *signature_length, &phar->
signature);
2056 zend_string_release(str);
2064static int phar_update_cached_entry(
zval *
data,
void *argument)
2087static void phar_manifest_copy_ctor(
zval *
zv)
2105 fname = phar->
fname;
2121 zend_hash_copy(&newmanifest, &(*pphar)->manifest, phar_manifest_copy_ctor);
2125 zend_get_hash_value,
NULL, 0);
2127 zend_get_hash_value,
NULL, 0);
strrchr(string $haystack, string $needle, bool $before_needle=false)
dir(string $directory, $context=null)
link(string $target, string $link)
memset(ptr, 0, type->size)
zend_ffi_ctype_name_buf buf
PHPAPI zend_string * php_resolve_path(const char *filename, size_t filename_length, const char *path)
PHPAPI int php_check_open_basedir(const char *path)
PHPAPI char * expand_filepath(const char *filepath, char *real_path)
PHP_HASH_API void PHP_SHA256Final(unsigned char digest[32], PHP_SHA256_CTX *context)
PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *context, const unsigned char *input, size_t inputLen)
PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX *context, const unsigned char *input, size_t inputLen)
PHP_HASH_API void PHP_SHA512Final(unsigned char digest[64], PHP_SHA512_CTX *context)
PHPAPI php_stream_filter * php_stream_filter_create(const char *filtername, zval *filterparams, uint8_t persistent)
PHPAPI php_stream_filter * php_stream_filter_remove(php_stream_filter *filter, int call_dtor)
PHPAPI void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx)
PHPAPI void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size)
char * phar_fix_filepath(char *path, size_t *new_len, int use_cwd)
zend_result phar_postprocess_file(phar_entry_data *idata, uint32_t crc32, char **error, int process_zip)
void phar_metadata_tracker_clone(phar_metadata_tracker *tracker)
zend_result phar_split_fname(const char *filename, size_t filename_len, char **arch, size_t *arch_len, char **entry, size_t *entry_len, int executable, int for_create)
void phar_request_initialize(void)
void destroy_phar_manifest_entry(zval *zv)
#define PHAR_SIG_OPENSSL_SHA512
phar_path_check_result phar_path_check(char **p, size_t *len, const char **error)
#define PHAR_ENT_COMPRESSED_GZ
#define PHAR_SIG_OPENSSL_SHA256
phar_archive_data * last_phar
struct _phar_entry_fp_info phar_entry_fp_info
#define PHAR_ENT_PERM_DEF_DIR
uint32_t last_phar_name_len
#define PHAR_ENT_PERM_DEF_FILE
char * phar_decompress_filter(phar_entry_info *entry, int return_unknown)
HashTable phar_persist_map
struct _phar_archive_data phar_archive_data
#define PHAR_ENT_COMPRESSION_MASK
uint32_t openssl_privatekey_len
#define PHAR_ENT_COMPRESSED_BZ2
struct _phar_entry_info phar_entry_info
struct _phar_entry_data phar_entry_data
union _phar_archive_object phar_archive_object
phar_entry_fp * cached_fp
zend_result phar_copy_on_write(phar_archive_data **pphar)
char * openssl_privatekey
unsigned const char * end
unsigned const char * pos
#define PHP_SHA256Init(ctx)
#define PHP_SHA512Init(ctx)
unsigned char key[REFLECTION_KEY_LEN]
#define php_stream_filter_append(chain, filter)
#define php_stream_filter_flush(filter, finish)
#define php_stream_fopen_tmpfile()
#define php_stream_stat_path(path, ssb)
struct _php_stream php_stream
#define php_stream_read(stream, buf, count)
struct _php_stream_filter php_stream_filter
#define php_stream_rewind(stream)
#define PHP_STREAM_COPY_ALL
#define php_stream_seek(stream, offset, whence)
#define php_stream_flush(stream)
#define php_stream_truncate_set_size(stream, size)
#define php_stream_close(stream)
#define php_stream_tell(stream)
#define php_stream_copy_to_mem(src, maxlen, persistent)
#define php_stream_open_wrapper(path, mode, options, opened)
#define php_stream_copy_to_stream_ex(src, dest, maxlen, len)
struct _php_stream_statbuf php_stream_statbuf
#define zend_hash_str_add(...)
PHPAPI void PHP_SHA1Final(unsigned char digest[20], PHP_SHA1_CTX *context)
PHPAPI void PHP_SHA1Update(PHP_SHA1_CTX *context, const unsigned char *input, size_t inputLen)
#define PHP_SHA1Init(ctx)
phar_metadata_tracker metadata_tracker
phar_entry_info * internal_file
uint32_t compressed_filesize
phar_metadata_tracker metadata_tracker
enum phar_fp_type fp_type
uint32_t uncompressed_filesize
php_stream_filter_chain writefilters
phar_archive_data * archive
void phar_add_virtual_dirs(phar_archive_data *phar, char *filename, size_t filename_len)
char * phar_compress_filter(phar_entry_info *entry, int return_unknown)
phar_entry_info * phar_get_link_source(phar_entry_info *entry)
int phar_seek_efp(phar_entry_info *entry, zend_off_t offset, int whence, zend_off_t position, int follow_links)
PHP_PHAR_API zend_result phar_resolve_alias(char *alias, size_t alias_len, char **filename, size_t *filename_len)
zend_string * phar_find_in_include_path(zend_string *filename, phar_archive_data **pphar)
zend_result phar_copy_entry_fp(phar_entry_info *source, phar_entry_info *dest, char **error)
phar_entry_data * phar_get_or_create_entry_data(char *fname, size_t fname_len, char *path, size_t path_len, const char *mode, char allow_dir, char **error, int security)
phar_entry_info * phar_get_entry_info_dir(phar_archive_data *phar, char *path, size_t path_len, char dir, char **error, int security)
php_stream * phar_get_efp(phar_entry_info *entry, int follow_links)
char * phar_decompress_filter(phar_entry_info *entry, int return_unknown)
zend_result phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signature, size_t *signature_length, char **error)
zend_result phar_open_archive_fp(phar_archive_data *phar)
phar_entry_info * phar_get_entry_info(phar_archive_data *phar, char *path, size_t path_len, char **error, int security)
zend_result phar_mount_entry(phar_archive_data *phar, char *filename, size_t filename_len, char *path, size_t path_len)
zend_result phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len)
zend_result phar_get_entry_data(phar_entry_data **ret, char *fname, size_t fname_len, char *path, size_t path_len, const char *mode, char allow_dir, char **error, int security)
zend_result phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, char *sig, size_t sig_len, char *fname, char **signature, size_t *signature_len, char **error)
zend_result phar_open_entry_fp(phar_entry_info *entry, char **error, int follow_links)
zend_result phar_get_archive(phar_archive_data **archive, char *fname, size_t fname_len, char *alias, size_t alias_len, char **error)
zend_result phar_copy_on_write(phar_archive_data **pphar)
phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, char **error)
ZEND_API HashTable module_registry
ZEND_API zend_result zend_fcall_info_init(zval *callable, uint32_t check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error)
struct _zend_fcall_info_cache zend_fcall_info_cache
struct _zend_fcall_info zend_fcall_info
#define ZVAL_STRINGL(z, s, l)
ZEND_API zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache)
#define ZVAL_EMPTY_STRING(z)
#define estrndup(s, length)
#define ecalloc(nmemb, size)
#define safe_pemalloc(nmemb, size, offset, persistent)
strncmp(string $string1, string $string2, int $length)
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API zend_string * zend_get_executed_filename_ex(void)
ZEND_API bool zend_is_executing(void)
ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *argument)
ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor)
ZEND_API zval *ZEND_FASTCALL zend_hash_add_empty_element(HashTable *ht, zend_string *key)
ZEND_API zend_result ZEND_FASTCALL zend_hash_str_del(HashTable *ht, const char *str, size_t len)
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
#define ZEND_HASH_MAP_FOREACH_PTR(ht, _ptr)
#define HT_IS_INITIALIZED(ht)
#define ZEND_HASH_APPLY_KEEP
#define ZEND_HASH_MAP_FOREACH_STR_KEY(ht, _key)
#define ZEND_HASH_FOREACH_END()
struct _zend_string zend_string
#define UNEXPECTED(condition)
ZEND_API zend_string_init_interned_func_t zend_string_init_interned
#define zend_string_starts_with_literal_ci(str, prefix)
struct _zend_array HashTable
#define ZVAL_NEW_REF(z, r)
ZEND_RESULT_CODE zend_result
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
#define DEFAULT_DIR_SEPARATOR