1
0
Fork 0
mirror of https://github.com/laravel-ls/go-php synced 2026-06-16 03:54:55 +02:00
go-php/zval.h
2025-11-02 10:47:20 +01:00

28 lines
707 B
C

#ifndef _GOPHP_ZVAL_H
#define _GOPHP_ZVAL_H
#include <Zend/zend_types.h>
// Structure to return a key-value pair from a hash table
typedef struct {
int key_type; // HASH_KEY_IS_STRING or HASH_KEY_IS_LONG
zend_string *key_str;
zend_long key_long;
zval value; // The value in the hash table
} hash_table_entry;
zval new_zval();
void zval_destroy(zval *val);
extern void zend_array_init_traverse(zend_array *arr, HashPosition *pos);
extern int zend_array_get_next(zend_array *arr, HashPosition *pos, hash_table_entry *entry);
zend_array* zval_get_array(zval *zv);
char* zend_string_cstr(zend_string *zstr);
void zval_set_long(zval *val, long int num);
#endif /* ! GOPHP_ZVAL_H */