36static int php_sqlite3_authorizer(
void *autharg,
int action,
const char *
arg1,
const char *
arg2,
const char *
arg3,
const char *arg4);
37static void sqlite3_param_dtor(
zval *
data);
40#define SQLITE3_CHECK_INITIALIZED(db_obj, member, class_name) \
41 if (!(db_obj) || !(member)) { \
42 zend_throw_error(NULL, "The " #class_name " object has not been correctly initialised or is already closed"); \
46#define SQLITE3_CHECK_INITIALIZED_FREE_TRAMPOLINE(db_obj, member, class_name, trampoline_fcc) \
47 if (!(db_obj) || !(member)) { \
48 zend_release_fcall_info_cache((trampoline_fcc)); \
49 zend_throw_error(NULL, "The " #class_name " object has not been correctly initialised or is already closed"); \
53#define SQLITE3_CHECK_INITIALIZED_STMT(member, class_name) \
55 zend_throw_error(NULL, "The " #class_name " object has not been correctly initialised or is already closed"); \
62#if SQLITE_VERSION_NUMBER >= 3026000
85 va_start(
arg, format);
89 if (db_obj && db_obj->exception) {
106 char *filename, *encryption_key, *fullpath;
123 memcmp(filename,
":memory:",
sizeof(
":memory:")-1) != 0)) {
139 rc = sqlite3_open_v2(fullpath, &(db_obj->
db),
flags,
NULL);
140 if (rc != SQLITE_OK) {
142#ifdef HAVE_SQLITE3_ERRSTR
143 db_obj->
db ? sqlite3_errmsg(db_obj->
db) : sqlite3_errstr(rc));
145 db_obj->
db ? sqlite3_errmsg(db_obj->
db) :
"");
147 sqlite3_close(db_obj->
db);
148 if (fullpath != filename) {
154#ifdef SQLITE_HAS_CODEC
155 if (encryption_key_len > 0) {
156 if (sqlite3_key(db_obj->
db, encryption_key, encryption_key_len) != SQLITE_OK) {
158 sqlite3_close(db_obj->
db);
167 sqlite3_set_authorizer(db_obj->
db, php_sqlite3_authorizer, db_obj);
169#if SQLITE_VERSION_NUMBER >= 3026000
171 sqlite3_db_config(db_obj->
db, SQLITE_DBCONFIG_DEFENSIVE, 1,
NULL);
175 if (fullpath != filename) {
196 errcode = sqlite3_close(db_obj->
db);
197 if (errcode != SQLITE_OK) {
198 php_sqlite3_error(db_obj, errcode,
"Unable to close database: %s", sqlite3_errmsg(db_obj->
db));
216 char *errtext =
NULL;
227 if (errcode != SQLITE_OK) {
228 php_sqlite3_error(db_obj, errcode,
"%s", errtext);
229 sqlite3_free(errtext);
246 add_assoc_string(
return_value,
"versionString", (
char*)sqlite3_libversion());
247 add_assoc_long(
return_value,
"versionNumber", sqlite3_libversion_number());
328 ret = sqlite3_extended_result_codes(db_obj->
db, enable ? 1 : 0);
329 if (
ret == SQLITE_OK)
366#ifdef SQLITE_ENABLE_API_ARMOR
377#ifdef SQLITE_ENABLE_API_ARMOR
378 return_code = sqlite3_busy_timeout(db_obj->
db, ms);
379 if (return_code != SQLITE_OK) {
380 php_sqlite3_error(db_obj, sqlite3_errcode(db_obj->
db),
"Unable to set busy timeout: %s", sqlite3_errmsg(db_obj->
db));
392#ifndef SQLITE_OMIT_LOAD_EXTENSION
400 size_t extension_len, extension_dir_len;
413 ) { php_sqlite3_error(db_obj, 0,
"Not supported in multithreaded Web servers");
419 php_sqlite3_error(db_obj, 0,
"SQLite Extensions are disabled");
423 if (extension_len == 0) {
438 php_sqlite3_error(db_obj, 0,
"Unable to load extension at '%s'", lib_path);
446 php_sqlite3_error(db_obj, 0,
"Unable to open extensions outside the defined directory");
451 sqlite3_enable_load_extension(db_obj->
db, 1);
452 if (sqlite3_load_extension(db_obj->
db, fullpath, 0, &errtext) != SQLITE_OK) {
453 php_sqlite3_error(db_obj, 0,
"%s", errtext);
454 sqlite3_free(errtext);
455 sqlite3_enable_load_extension(db_obj->
db, 0);
458 sqlite3_enable_load_extension(db_obj->
db, 0);
528 stmt_obj->
db_obj = db_obj;
532 if (errcode != SQLITE_OK) {
533 php_sqlite3_error(db_obj, errcode,
"Unable to prepare statement: %s", sqlite3_errmsg(db_obj->
db));
557 char *errtext =
NULL;
575 if (errcode != SQLITE_OK) {
576 php_sqlite3_error(db_obj, errcode,
"%s", errtext);
577 sqlite3_free(errtext);
584 stmt_obj->
db_obj = db_obj;
588 if (return_code != SQLITE_OK) {
589 php_sqlite3_error(db_obj, return_code,
"Unable to prepare statement: %s", sqlite3_errmsg(db_obj->
db));
599 result->stmt_obj = stmt_obj;
601 result->column_count = -1;
604 return_code = sqlite3_step(
result->stmt_obj->stmt);
606 switch (return_code) {
615 sqlite3_reset(
result->stmt_obj->stmt);
620 php_sqlite3_error(db_obj, sqlite3_errcode(db_obj->
db),
"Unable to execute statement: %s", sqlite3_errmsg(db_obj->
db));
622 sqlite3_finalize(stmt_obj->
stmt);
630static void sqlite_value_to_zval(sqlite3_stmt *stmt,
int column,
zval *
data)
634 switch (sqlite3_column_type(stmt, column)) {
636 val = sqlite3_column_int64(stmt, column);
637#if LONG_MAX <= 2147483647
639 ZVAL_STRINGL(
data, (
char *)sqlite3_column_text(stmt, column), sqlite3_column_bytes(stmt, column));
643#if LONG_MAX <= 2147483647
662 ZVAL_STRINGL(
data, (
char*)sqlite3_column_blob(stmt, column), sqlite3_column_bytes(stmt, column));
673 char *errtext =
NULL;
693 if (errcode != SQLITE_OK) {
694 php_sqlite3_error(db_obj, errcode,
"%s", errtext);
695 sqlite3_free(errtext);
701 if (return_code != SQLITE_OK) {
702 php_sqlite3_error(db_obj, return_code,
"Unable to prepare statement: %s", sqlite3_errmsg(db_obj->
db));
706 return_code = sqlite3_step(stmt);
708 switch (return_code) {
716 for (i = 0; i < sqlite3_data_count(stmt); i++) {
718 sqlite_value_to_zval(stmt, i, &
data);
735 php_sqlite3_error(db_obj, sqlite3_errcode(db_obj->
db),
"Unable to execute statement: %s", sqlite3_errmsg(db_obj->
db));
739 sqlite3_finalize(stmt);
756 fake_argc = argc + is_agg;
774 for (i = 0; i < argc; i++) {
775 switch (sqlite3_value_type(argv[i])) {
777#if ZEND_LONG_MAX > 2147483647
778 ZVAL_LONG(&zargs[i + is_agg], sqlite3_value_int64(argv[i]));
780 ZVAL_LONG(&zargs[i + is_agg], sqlite3_value_int(argv[i]));
785 ZVAL_DOUBLE(&zargs[i + is_agg], sqlite3_value_double(argv[i]));
795 ZVAL_STRINGL(&zargs[i + is_agg], (
char*)sqlite3_value_text(argv[i]), sqlite3_value_bytes(argv[i]));
800 zend_call_known_fcc(fcc, &
retval, fake_argc, zargs,
NULL);
808 for (i = is_agg; i < argc + is_agg; i++) {
814 if (!is_agg || !argv) {
820#if ZEND_LONG_MAX > 2147483647
842 zend_string_release(str);
847 sqlite3_result_error(
context,
"failed to invoke callback", 0);
870static void php_sqlite3_callback_func(sqlite3_context *
context,
int argc, sqlite3_value **argv)
874 sqlite3_do_callback(&
func->func, argc, argv,
context, 0);
878static void php_sqlite3_callback_step(sqlite3_context *
context,
int argc, sqlite3_value **argv)
885 sqlite3_do_callback(&
func->step, argc, argv,
context, 1);
889static void php_sqlite3_callback_final(sqlite3_context *
context)
900static int php_sqlite3_callback_compare(
void *coll,
int a_len,
const void *
a,
int b_len,
const void* b)
926 php_sqlite3_error(
NULL, 0,
"An error occurred while invoking the compare callback (invalid return type). Collation behaviour is undefined.");
966 if (sqlite3_create_function(db_obj->
db, sql_func, sql_func_num_args,
flags | SQLITE_UTF8,
func, php_sqlite3_callback_func,
NULL,
NULL) == SQLITE_OK) {
968 zend_fcc_dup(&
func->func, &fcc);
970 func->argc = sql_func_num_args;
1004 zend_throw_error(
NULL,
"The SQLite3 object has not been correctly initialised or is already closed");
1008 if (!sql_func_len) {
1015 if (sqlite3_create_function(db_obj->
db, sql_func, sql_func_num_args, SQLITE_UTF8,
func,
NULL, php_sqlite3_callback_step, php_sqlite3_callback_final) == SQLITE_OK) {
1018 zend_fcc_dup(&
func->step, &step_fcc);
1019 zend_fcc_dup(&
func->fini, &fini_fcc);
1021 func->argc = sql_func_num_args;
1043 char *collation_name;
1044 size_t collation_name_len;
1055 if (!collation_name_len) {
1062 if (sqlite3_create_collation(db_obj->
db, collation_name, SQLITE_UTF8, collation, php_sqlite3_callback_compare) == SQLITE_OK) {
1065 zend_fcc_dup(&collation->
cmp_func, &fcc);
1086static ssize_t php_sqlite3_stream_write(
php_stream *stream,
const char *
buf,
size_t count)
1091 php_sqlite3_error(
NULL, 0,
"Can't write to blob stream: is open as read only");
1096 php_sqlite3_error(
NULL, 0,
"It is not possible to increase the size of a BLOB");
1100 if (sqlite3_blob_write(sqlite3_stream->
blob,
buf,
count, sqlite3_stream->
position) != SQLITE_OK) {
1124 if (sqlite3_blob_read(sqlite3_stream->
blob,
buf,
count, sqlite3_stream->
position) != SQLITE_OK) {
1132static int php_sqlite3_stream_close(
php_stream *stream,
int close_handle)
1136 if (sqlite3_blob_close(sqlite3_stream->
blob) != SQLITE_OK) {
1140 efree(sqlite3_stream);
1145static int php_sqlite3_stream_flush(
php_stream *stream)
1165 *newoffs = sqlite3_stream->
position;
1176 *newoffs = sqlite3_stream->
position;
1182 if (sqlite3_stream->
size < (
size_t)(
offset)) {
1188 *newoffs = sqlite3_stream->
position;
1197 }
else if (sqlite3_stream->
size < (
size_t)(-
offset)) {
1203 *newoffs = sqlite3_stream->
position;
1208 *newoffs = sqlite3_stream->
position;
1215static int php_sqlite3_stream_cast(
php_stream *stream,
int castas,
void **
ret)
1223 ssb->sb.st_size = sqlite3_stream->
size;
1228 php_sqlite3_stream_write,
1229 php_sqlite3_stream_read,
1230 php_sqlite3_stream_close,
1231 php_sqlite3_stream_flush,
1233 php_sqlite3_stream_seek,
1234 php_sqlite3_stream_cast,
1235 php_sqlite3_stream_stat,
1244 const char *table, *column, *dbname =
"main", *
mode =
"rb";
1245 size_t table_len, column_len, dbname_len;
1247 sqlite3_blob *blob =
NULL;
1261 if (sqlite3_blob_open(db_obj->
db, dbname, table, column, rowid, sqlite_flags, &blob) != SQLITE_OK) {
1262 php_sqlite3_error(db_obj, sqlite3_errcode(db_obj->
db),
"Unable to open blob: %s", sqlite3_errmsg(db_obj->
db));
1267 sqlite3_stream->
blob = blob;
1270 sqlite3_stream->
size = sqlite3_blob_bytes(blob);
1272 if (sqlite_flags != 0) {
1291 bool enableExceptions = 0;
1301 if (!enableExceptions) {
1338#if SQLITE_VERSION_NUMBER >= 3006011
1344 const char *source_dbname =
"main", *destination_dbname =
"main";
1345 size_t source_dbname_length, destination_dbname_length;
1347 zval *destination_zval;
1348 sqlite3_backup *dbBackup;
1362 dbBackup = sqlite3_backup_init(destination_obj->
db, destination_dbname, source_obj->
db, source_dbname);
1366 rc = sqlite3_backup_step(dbBackup, -1);
1367 }
while (rc == SQLITE_OK);
1370 rc = sqlite3_backup_finish(dbBackup);
1373 rc = sqlite3_errcode(source_obj->
db);
1376 if (rc != SQLITE_OK) {
1377 if (rc == SQLITE_BUSY) {
1378 php_sqlite3_error(source_obj, rc,
"Backup failed: source database is busy");
1380 else if (rc == SQLITE_LOCKED) {
1381 php_sqlite3_error(source_obj, rc,
"Backup failed: source database is locked");
1384 php_sqlite3_error(source_obj, rc,
"Backup failed: %s", sqlite3_errmsg(source_obj->
db));
1439 if (sqlite3_reset(stmt_obj->
stmt) != SQLITE_OK) {
1440 php_sqlite3_error(stmt_obj->
db_obj, sqlite3_errcode(sqlite3_db_handle(stmt_obj->
stmt)),
"Unable to reset statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->
stmt)));
1459 if (sqlite3_clear_bindings(stmt_obj->
stmt) != SQLITE_OK) {
1460 php_sqlite3_error(stmt_obj->
db_obj, sqlite3_errcode(sqlite3_db_handle(stmt_obj->
stmt)),
"Unable to clear statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->
stmt)));
1486 if (sqlite3_stmt_readonly(stmt_obj->
stmt)) {
1512 if (return_code != SQLITE_OK) {
1518 switch (param->
type) {
1519 case SQLITE_INTEGER:
1521#if ZEND_LONG_MAX > 2147483647
1526 if (return_code != SQLITE_OK) {
1534 if (return_code != SQLITE_OK) {
1545 if (stream ==
NULL) {
1546 php_sqlite3_error(stmt_obj->
db_obj, 0,
"Unable to read stream for parameter %ld", param->
param_number);
1557 if (return_code != SQLITE_OK) {
1562 if (return_code != SQLITE_OK) {
1575 if (return_code != SQLITE_OK) {
1578 zend_string_release(str);
1584 if (return_code != SQLITE_OK) {
1590 php_sqlite3_error(stmt_obj->
db_obj, 0,
"Unknown parameter type: %pd for parameter %pd", param->
type, param->
param_number);
1618 bind_rc = php_sqlite3_bind_params(stmt_obj);
1625#ifdef HAVE_SQLITE3_EXPANDED_SQL
1626 char *sql = sqlite3_expanded_sql(stmt_obj->
stmt);
1630 php_sqlite3_error(stmt_obj->
db_obj, 0,
"The expanded parameter requires SQLite3 >= 3.14 and %s is installed", sqlite3_libversion());
1634 const char *sql = sqlite3_sql(stmt_obj->
stmt);
1661 param->
name = zend_string_copy(param->
name);
1687#define PHP_SQLITE3_SET_TYPE(z, p) \
1688 switch (Z_TYPE_P(z)) { \
1690 (p).type = SQLITE_TEXT; \
1695 (p).type = SQLITE_INTEGER; \
1698 (p).type = SQLITE_FLOAT; \
1701 (p).type = SQLITE_NULL; \
1734 if (!register_bound_parameter_to_sqlite(¶m, stmt_obj)) {
1759#undef PHP_SQLITE3_SET_TYPE
1767 int return_code = 0;
1777 sqlite3_reset(stmt_obj->
stmt);
1780 bind_rc = php_sqlite3_bind_params(stmt_obj);
1786 return_code = sqlite3_step(stmt_obj->
stmt);
1788 switch (return_code) {
1792 sqlite3_reset(stmt_obj->
stmt);
1796 result->is_prepared_statement = 1;
1798 result->stmt_obj = stmt_obj;
1800 result->column_count = -1;
1806 sqlite3_reset(stmt_obj->
stmt);
1810 php_sqlite3_error(stmt_obj->
db_obj, sqlite3_errcode(sqlite3_db_handle(stmt_obj->
stmt)),
"Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->
stmt)));
1845 stmt_obj->
db_obj = db_obj;
1849 if (errcode != SQLITE_OK) {
1850 php_sqlite3_error(db_obj, errcode,
"Unable to prepare statement: %s", sqlite3_errmsg(db_obj->
db));
1895 column_name = (
char*) sqlite3_column_name(result_obj->
stmt_obj->
stmt, column);
1897 if (column_name ==
NULL) {
1961 for (
int i = 0; i < n_cols; i++) {
1962 const char *column = sqlite3_column_name(result_obj->
stmt_obj->
stmt, i);
1969 for (i = 0; i < n_cols; i++) {
1996 php_sqlite3_error(result_obj->
db_obj, sqlite3_errcode(sqlite3_db_handle(result_obj->
stmt_obj->
stmt)),
"Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->
stmt_obj->
stmt)));
2002 if (
result->column_names) {
2003 for (
int i = 0; i <
result->column_count; i++) {
2004 zend_string_release(
result->column_names[i]);
2009 result->column_count = -1;
2023 sqlite3result_clear_column_names_cache(result_obj);
2025 if (sqlite3_reset(result_obj->
stmt_obj->
stmt) != SQLITE_OK) {
2044 sqlite3result_clear_column_names_cache(result_obj);
2049 (int (*)(
void *,
void *)) php_sqlite3_compare_stmt_zval_free);
2066static int php_sqlite3_authorizer(
void *autharg,
int action,
const char *
arg1,
const char *
arg2,
const char *
arg3,
const char *arg4)
2069 if (
PG(open_basedir) && *
PG(open_basedir)) {
2070 if (action == SQLITE_ATTACH) {
2074 if (memcmp(
arg1,
":memory:",
sizeof(
":memory:")) && *
arg1) {
2122 int authreturn = SQLITE_DENY;
2126 php_sqlite3_error(db_obj, 0,
"An error occurred while invoking the authorizer callback");
2129 php_sqlite3_error(db_obj, 0,
"The authorizer callback returned an invalid type: expected int");
2133 if (authreturn != SQLITE_OK && authreturn != SQLITE_IGNORE && authreturn != SQLITE_DENY) {
2134 php_sqlite3_error(db_obj, 0,
"The authorizer callback returned an invalid value: %d", authreturn);
2135 authreturn = SQLITE_DENY;
2153static void php_sqlite3_free_list_dtor(
void **item)
2167 return ((*free_list)->stmt_obj->initialised &&
Z_PTR_P(statement) ==
Z_PTR((*free_list)->stmt_obj_zval));
2171static int php_sqlite3_compare_stmt_free(
php_sqlite3_free_list **free_list, sqlite3_stmt *statement )
2173 return ((*free_list)->stmt_obj->initialised && statement == (*free_list)->stmt_obj->stmt);
2177static void php_sqlite3_object_free_storage(
zend_object *
object)
2192 while (intern->
funcs) {
2202 zend_fcc_dtor(&
func->func);
2205 zend_fcc_dtor(&
func->step);
2208 zend_fcc_dtor(&
func->fini);
2221 zend_fcc_dtor(&collation->
cmp_func);
2227 sqlite3_close(intern->
db);
2238 zend_get_gc_buffer_add_fcc(gc_buffer, fcc);
2254 php_sqlite3_gc_buffer_add_fcc(gc_buffer, &intern->
authorizer_fcc);
2258 php_sqlite3_gc_buffer_add_fcc(gc_buffer, &
func->func);
2259 php_sqlite3_gc_buffer_add_fcc(gc_buffer, &
func->step);
2260 php_sqlite3_gc_buffer_add_fcc(gc_buffer, &
func->fini);
2265 while (collation !=
NULL) {
2266 php_sqlite3_gc_buffer_add_fcc(gc_buffer, &collation->
cmp_func);
2267 collation = collation->
next;
2270 zend_get_gc_buffer_use(gc_buffer, table,
n);
2272 if (
object->properties ==
NULL &&
object->ce->default_properties_count == 0) {
2280static void php_sqlite3_stmt_object_free_storage(
zend_object *
object)
2296 (int (*)(
void *,
void *)) php_sqlite3_compare_stmt_free);
2307static void php_sqlite3_result_object_free_storage(
zend_object *
object)
2315 sqlite3result_clear_column_names_cache(intern);
2374static void sqlite3_param_dtor(
zval *
data)
2398 if (!sqlite3_threadsafe()) {
2410 sqlite3_object_handlers.clone_obj =
NULL;
2411 sqlite3_object_handlers.free_obj = php_sqlite3_object_free_storage;
2412 sqlite3_object_handlers.get_gc = php_sqlite3_get_gc;
2413 php_sqlite3_sc_entry = register_class_SQLite3();
2414 php_sqlite3_sc_entry->create_object = php_sqlite3_object_new;
2415 php_sqlite3_sc_entry->default_object_handlers = &sqlite3_object_handlers;
2419 sqlite3_stmt_object_handlers.clone_obj =
NULL;
2420 sqlite3_stmt_object_handlers.free_obj = php_sqlite3_stmt_object_free_storage;
2421 php_sqlite3_stmt_entry = register_class_SQLite3Stmt();
2422 php_sqlite3_stmt_entry->create_object = php_sqlite3_stmt_object_new;
2423 php_sqlite3_stmt_entry->default_object_handlers = &sqlite3_stmt_object_handlers;
2427 sqlite3_result_object_handlers.clone_obj =
NULL;
2428 sqlite3_result_object_handlers.free_obj = php_sqlite3_result_object_free_storage;
2435 register_sqlite3_symbols(module_number);
2465#if defined(COMPILE_DL_SQLITE3) && defined(ZTS)
2468 memset(sqlite3_globals, 0,
sizeof(*sqlite3_globals));
2491#ifdef COMPILE_DL_SQLITE3
SAPI_API sapi_module_struct sapi_module
reset(array|object &$array)
count(Countable|array $value, int $mode=COUNT_NORMAL)
memset(ptr, 0, type->size)
zend_ffi_ctype_name_buf buf
PHPAPI int php_check_open_basedir(const char *path)
PHPAPI char * expand_filepath(const char *filepath, char *real_path)
hash(string $algo, string $data, bool $binary=false, array $options=[])
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format,...)
php_info_print_table_start()
php_info_print_table_row(2, "PDO Driver for Firebird", "enabled")
php_info_print_table_end()
#define PHP_MSHUTDOWN_FUNCTION
#define PHP_MINIT_FUNCTION
#define PHP_MINFO_FUNCTION
#define PHP_GINIT_FUNCTION
#define php_ignore_value(x)
#define PHP_MODULE_GLOBALS
#define STD_PHP_INI_ENTRY
#define STD_PHP_INI_BOOLEAN
#define PHP_SQLITE3_ASSOC
zend_module_entry sqlite3_module_entry
#define PHP_SQLITE3_VERSION
struct _php_sqlite3_free_list php_sqlite3_free_list
#define SQLITE_OPEN_CREATE
#define Z_SQLITE3_STMT_P(zv)
#define SQLITE_OPEN_READWRITE
#define Z_SQLITE3_DB_P(zv)
struct _php_sqlite3_stmt_object php_sqlite3_stmt
struct _php_sqlite3_collation php_sqlite3_collation
struct _php_sqlite3_result_object php_sqlite3_result
#define SQLITE_OPEN_READONLY
struct _php_sqlite3_db_object php_sqlite3_db_object
struct _php_sqlite3_agg_context php_sqlite3_agg_context
#define Z_SQLITE3_RESULT_P(zv)
struct _php_sqlite3_func php_sqlite3_func
struct _php_stream php_stream
#define PHP_STREAM_COPY_ALL
#define php_stream_to_zval(stream, zval)
#define php_stream_copy_to_mem(src, maxlen, persistent)
struct _php_stream_ops php_stream_ops
#define php_stream_from_zval_no_verify(xstr, pzval)
#define php_stream_alloc(ops, thisptr, persistent_id, mode)
struct _php_stream_statbuf php_stream_statbuf
zend_class_entry * php_sqlite3_result_entry
#define SQLITE3_CHECK_INITIALIZED(db_obj, member, class_name)
#define SQLITE3_CHECK_INITIALIZED_STMT(member, class_name)
#define SQLITE3_CHECK_INITIALIZED_FREE_TRAMPOLINE(db_obj, member, class_name, trampoline_fcc)
#define PHP_SQLITE3_SET_TYPE(z, p)
const char * collation_name
zend_fcall_info_cache cmp_func
struct _php_sqlite3_collation * next
php_sqlite3_collation * collations
zend_fcall_info_cache authorizer_fcc
php_sqlite3_stmt * stmt_obj
int is_prepared_statement
php_sqlite3_stmt * stmt_obj
zend_string ** column_names
php_sqlite3_db_object * db_obj
php_sqlite3_db_object * db_obj
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
#define ZEND_TSRMLS_CACHE_UPDATE()
#define INTERNAL_FUNCTION_PARAMETERS
#define ZEND_TSRMLS_CACHE_DEFINE()
#define INTERNAL_FUNCTION_PARAM_PASSTHRU
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec,...)
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num)
ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc)
ZEND_API const zend_fcall_info empty_fcall_info
ZEND_API const zend_fcall_info_cache empty_fcall_info_cache
struct _zend_fcall_info_cache zend_fcall_info_cache
#define ZEND_PARSE_PARAMETERS_END()
#define ZEND_PARSE_PARAMETERS_NONE()
#define ZVAL_STRING(z, s)
#define ZEND_DECLARE_MODULE_GLOBALS(module_name)
#define ZEND_GET_MODULE(name)
#define zend_parse_parameters_none()
#define ZEND_FCI_INITIALIZED(fci)
#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args)
#define Z_PARAM_LONG(dest)
#define RETVAL_EMPTY_ARRAY()
struct _zend_fcall_info zend_fcall_info
#define Z_PARAM_FUNC_NO_TRAMPOLINE_FREE_OR_NULL(dest_fci, dest_fcc)
#define ZEND_FCC_INITIALIZED(fcc)
#define Z_PARAM_STR_OR_LONG(dest_str, dest_long)
#define Z_PARAM_BOOL(dest)
#define RETURN_EMPTY_STRING()
#define Z_PARAM_ZVAL(dest)
#define ZVAL_STRINGL(z, s, l)
#define ecalloc(nmemb, size)
#define FREE_HASHTABLE(ht)
#define safe_emalloc(nmemb, size, offset)
#define ALLOC_HASHTABLE(ht)
strncmp(string $string1, string $string2, int $length)
strcmp(string $string1, string $string2)
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API zend_class_entry * zend_ce_exception
ZEND_API ZEND_COLD zend_object * zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code)
ZEND_API ZEND_COLD zend_object * zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format,...)
ZEND_API zend_get_gc_buffer * zend_get_gc_buffer_create(void)
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
ZEND_API zend_result ZEND_FASTCALL zend_hash_index_del(HashTable *ht, zend_ulong h)
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
#define ZEND_HASH_FOREACH_PTR(ht, _ptr)
#define ZEND_HASH_FOREACH_END()
#define UNREGISTER_INI_ENTRIES()
#define REGISTER_INI_ENTRIES()
#define DISPLAY_INI_ENTRIES()
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int(*compare)(void *element1, void *element2))
ZEND_API void zend_llist_add_element(zend_llist *l, const void *element)
ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent)
ZEND_API void zend_llist_clean(zend_llist *l)
void(* llist_dtor_func_t)(void *)
struct _zend_string zend_string
#define STANDARD_MODULE_HEADER
struct _zend_module_entry zend_module_entry
#define STANDARD_MODULE_PROPERTIES_EX
ZEND_API HashTable * zend_std_get_properties(zend_object *zobj)
ZEND_API const zend_object_handlers std_object_handlers
ZEND_API HashTable * zend_std_get_gc(zend_object *zobj, zval **table, int *n)
ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce)
ZEND_API void zend_object_std_dtor(zend_object *object)
ZEND_API void ZEND_FASTCALL convert_to_double(zval *op)
ZEND_API void ZEND_FASTCALL convert_to_long(zval *op)
#define XtOffsetOf(s_type, field)
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
struct _zend_array HashTable
#define Z_REFCOUNTED(zval)
#define ZVAL_DOUBLE(z, d)
#define ZVAL_OBJ_COPY(z, o)
ZEND_RESULT_CODE zend_result
struct _zend_object_handlers zend_object_handlers
#define ZVAL_COPY_VALUE(z, v)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
#define VCWD_REALPATH(path, real_path)