php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
com_handlers.c
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 | Author: Wez Furlong <wez@thebrainroom.com> |
14 +----------------------------------------------------------------------+
15 */
16
17#ifdef HAVE_CONFIG_H
18#include <config.h>
19#endif
20
21#include "php.h"
22#include "php_ini.h"
23#include "ext/standard/info.h"
24#include "php_com_dotnet.h"
27
28static zval *com_property_read(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv)
29{
31 VARIANT v;
32 HRESULT res;
33
35
36 obj = (php_com_dotnet_object*) object;
37
38 if (V_VT(&obj->v) == VT_DISPATCH) {
39 VariantInit(&v);
40
41 res = php_com_do_invoke(obj, member, DISPATCH_METHOD|DISPATCH_PROPERTYGET,
42 &v, 0, NULL, 1);
43
44 if (res == SUCCESS) {
46 VariantClear(&v);
47 } else if (res == DISP_E_BADPARAMCOUNT) {
48 zval zv;
49
50 ZVAL_STR(&zv, member);
51 php_com_saproxy_create(object, rv, &zv);
52 }
53 } else {
54 php_com_throw_exception(E_INVALIDARG, "this variant has no properties");
55 }
56
57 return rv;
58}
59
60static zval *com_property_write(zend_object *object, zend_string *member, zval *value, void **cache_slot)
61{
63 VARIANT v;
64
65 obj = (php_com_dotnet_object*) object;
66
67 if (V_VT(&obj->v) == VT_DISPATCH) {
68 VariantInit(&v);
69
70 if (SUCCESS == php_com_do_invoke(obj, member,
71 DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &v, 1, value, 0)) {
72 VariantClear(&v);
73 }
74 } else {
75 php_com_throw_exception(E_INVALIDARG, "this variant has no properties");
76 }
77 return value;
78}
79
80static zval *com_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
81{
83 VARIANT v;
84
86
87 obj = (php_com_dotnet_object*) object;
88
89 if (V_VT(&obj->v) == VT_DISPATCH) {
90 VariantInit(&v);
91
92 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE,
93 DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, 1, offset, 0, 0)) {
95 VariantClear(&v);
96 }
97 } else if (V_ISARRAY(&obj->v)) {
99
100 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) {
101 if (php_com_safearray_get_elem(&obj->v, &v, (LONG)Z_LVAL_P(offset))) {
103 VariantClear(&v);
104 }
105 } else {
107 }
108
109 } else {
110 php_com_throw_exception(E_INVALIDARG, "this variant is not an array type");
111 }
112
113 return rv;
114}
115
116static void com_write_dimension(zend_object *object, zval *offset, zval *value)
117{
119 zval args[2];
120 VARIANT v;
121 HRESULT res;
122
123 obj = (php_com_dotnet_object*) object;
124
125 if (offset == NULL) {
126 php_com_throw_exception(DISP_E_BADINDEX, "appending to variants is not supported");
127 return;
128 }
129
130 if (V_VT(&obj->v) == VT_DISPATCH) {
133
134 VariantInit(&v);
135
136 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE,
137 DISPATCH_METHOD|DISPATCH_PROPERTYPUT, &v, 2, args, 0, 0)) {
138 VariantClear(&v);
139 }
140 } else if (V_ISARRAY(&obj->v)) {
141 LONG indices = 0;
142 VARTYPE vt;
143
144 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) {
145 if (FAILED(SafeArrayGetVartype(V_ARRAY(&obj->v), &vt)) || vt == VT_EMPTY) {
146 vt = V_VT(&obj->v) & ~VT_ARRAY;
147 }
148
150 indices = (LONG)Z_LVAL_P(offset);
151
152 VariantInit(&v);
154
155 if (V_VT(&v) != vt) {
156 VariantChangeType(&v, &v, 0, vt);
157 }
158
159 if (vt == VT_VARIANT) {
160 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v);
161 } else {
162 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v.lVal);
163 }
164
165 VariantClear(&v);
166
167 if (FAILED(res)) {
169 }
170
171 } else {
172 php_com_throw_exception(DISP_E_BADINDEX, "this variant has multiple dimensions; you can't set a new value without specifying *all* dimensions");
173 }
174
175 } else {
176 php_com_throw_exception(E_INVALIDARG, "this variant is not an array type");
177 }
178}
179
180static zval *com_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot)
181{
182 return NULL;
183}
184
185static int com_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot)
186{
187 DISPID dispid;
189
190 obj = (php_com_dotnet_object*) object;
191
192 if (V_VT(&obj->v) == VT_DISPATCH) {
193 if (SUCCEEDED(php_com_get_id_of_name(obj, member, &dispid))) {
194 /* TODO: distinguish between property and method! */
195 return 1;
196 }
197 } else {
198 /* TODO: check for safearray */
199 }
200
201 return 0;
202}
203
204static int com_dimension_exists(zend_object *object, zval *member, int check_empty)
205{
206 /* TODO Add support */
207 zend_throw_error(NULL, "Cannot check dimension on a COM object");
208 return 0;
209}
210
211static void com_property_delete(zend_object *object, zend_string *member, void **cache_slot)
212{
213 zend_throw_error(NULL, "Cannot delete properties from a COM object");
214}
215
216static void com_dimension_delete(zend_object *object, zval *offset)
217{
218 zend_throw_error(NULL, "Cannot delete dimension from a COM object");
219}
220
221static HashTable *com_properties_get(zend_object *object)
222{
223 /* TODO: use type-info to get all the names and values ?
224 * DANGER: if we do that, there is a strong possibility for
225 * infinite recursion when the hash is displayed via var_dump().
226 * Perhaps it is best to leave it un-implemented.
227 */
228 return (HashTable *) &zend_empty_array;
229}
230
231static HashTable *com_get_gc(zend_object *object, zval **table, int *n)
232{
233 *table = NULL;
234 *n = 0;
235 return NULL;
236}
237
238static void function_dtor(zval *zv)
239{
241
243 if (f->arg_info) {
244 efree(f->arg_info);
245 }
246 efree(f);
247}
248
249static PHP_FUNCTION(com_method_handler)
250{
251 zval *object = getThis();
252 zend_string *method = EX(func)->common.function_name;
253 zval *args = NULL;
254 php_com_dotnet_object *obj = CDNO_FETCH(object);
255 int nargs;
256 VARIANT v;
258
259 if (V_VT(&obj->v) != VT_DISPATCH) {
260 goto exit;
261 }
262
263 nargs = ZEND_NUM_ARGS();
264
265 if (nargs) {
266 args = (zval *)safe_emalloc(sizeof(zval), nargs, 0);
268 }
269
270 VariantInit(&v);
271
272 if (SUCCESS == php_com_do_invoke_byref(obj, (zend_internal_function*)EX(func), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, nargs, args)) {
274 VariantClear(&v);
275 }
276
277 if (args) {
278 efree(args);
279 }
280
281exit:
282 /* Cleanup trampoline */
283 ZEND_ASSERT(EX(func)->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE);
284 zend_string_release(EX(func)->common.function_name);
286 EX(func) = NULL;
287}
288
289static zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key)
290{
291 zend_internal_function f, *fptr = NULL;
293 DISPID dummy;
294 php_com_dotnet_object *obj = (php_com_dotnet_object*)*object_ptr;
295
296 if (V_VT(&obj->v) != VT_DISPATCH) {
297 return NULL;
298 }
299
300 if (FAILED(php_com_get_id_of_name(obj, name, &dummy))) {
301 return NULL;
302 }
303
304 /* check cache */
305 if (obj->method_cache == NULL || NULL == (fptr = zend_hash_find_ptr(obj->method_cache, name))) {
306 memset(&f, 0, sizeof(zend_internal_function));
308 f.num_args = 0;
309 f.arg_info = NULL;
310 f.scope = obj->ce;
312 f.function_name = zend_string_copy(name);
313 f.handler = PHP_FN(com_method_handler);
314 f.doc_comment = NULL;
315
316 fptr = &f;
317
318 if (obj->typeinfo) {
319 /* look for byref params */
320 ITypeComp *comp;
321 ITypeInfo *TI = NULL;
322 DESCKIND kind;
323 BINDPTR bindptr;
324 OLECHAR *olename;
325 ULONG lhash;
326 int i;
327
328 if (SUCCEEDED(ITypeInfo_GetTypeComp(obj->typeinfo, &comp))) {
329 olename = php_com_string_to_olestring(name->val, name->len, obj->code_page);
330 lhash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, olename);
331
332 if (SUCCEEDED(ITypeComp_Bind(comp, olename, lhash, INVOKE_FUNC, &TI, &kind, &bindptr))) {
333 switch (kind) {
334 case DESCKIND_FUNCDESC:
335 f.arg_info = ecalloc(bindptr.lpfuncdesc->cParams, sizeof(zend_arg_info));
336
337 for (i = 0; i < bindptr.lpfuncdesc->cParams; i++) {
338 bool by_ref = (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) != 0;
340 }
341
342 f.num_args = bindptr.lpfuncdesc->cParams;
343
344 ITypeInfo_ReleaseFuncDesc(TI, bindptr.lpfuncdesc);
345 break;
346
347 /* these should not happen, but *might* happen if the user
348 * screws up; lets avoid a leak in that case */
349 case DESCKIND_VARDESC:
350 ITypeInfo_ReleaseVarDesc(TI, bindptr.lpvardesc);
351 break;
352 case DESCKIND_TYPECOMP:
353 ITypeComp_Release(bindptr.lptcomp);
354 break;
355
356 case DESCKIND_NONE:
357 break;
358 }
359 if (TI) {
360 ITypeInfo_Release(TI);
361 }
362 }
363 ITypeComp_Release(comp);
364 efree(olename);
365 }
366 }
367
369 /* save this method in the cache */
370 if (!obj->method_cache) {
372 zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0);
373 }
374
375 zend_hash_update_mem(obj->method_cache, name, &f, sizeof(f));
376 }
377
378 if (fptr) {
379 /* duplicate this into a new chunk of emalloc'd memory,
380 * since the engine will efree it */
381 zend_string_addref(fptr->function_name);
382 func = emalloc(sizeof(*fptr));
383 memcpy(func, fptr, sizeof(*fptr));
384
385 return func;
386 }
387
388 return NULL;
389}
390
391static zend_string* com_class_name_get(const zend_object *object)
392{
394
395 return zend_string_copy(obj->ce->name);
396}
397
398/* This compares two variants for equality */
399static int com_objects_compare(zval *object1, zval *object2)
400{
401 php_com_dotnet_object *obja, *objb;
402 int ret;
403 /* strange header bug problem here... the headers define the proto without the
404 * flags parameter. However, the MSDN docs state that there is a flags parameter,
405 * and my VC6 won't link unless the code uses the version with 4 parameters.
406 * So, we have this declaration here to fix it */
407 STDAPI VarCmp(LPVARIANT pvarLeft, LPVARIANT pvarRight, LCID lcid, DWORD flags);
408
409 ZEND_COMPARE_OBJECTS_FALLBACK(object1, object2);
410
411 obja = CDNO_FETCH(object1);
412 objb = CDNO_FETCH(object2);
413
414 switch (VarCmp(&obja->v, &objb->v, LOCALE_NEUTRAL, 0)) {
415 case VARCMP_LT:
416 ret = -1;
417 break;
418 case VARCMP_GT:
419 ret = 1;
420 break;
421 case VARCMP_EQ:
422 ret = 0;
423 break;
424 default:
425 /* either or both operands are NULL...
426 * not 100% sure how to handle this */
427 ret = -2;
428 }
429
430 return ret;
431}
432
433static zend_result com_object_cast(zend_object *readobj, zval *writeobj, int type)
434{
436 VARIANT v;
437 VARTYPE vt = VT_EMPTY;
438 HRESULT res = S_OK;
439
440 obj = (php_com_dotnet_object*) readobj;
441 ZVAL_NULL(writeobj);
442 VariantInit(&v);
443
444 if (V_VT(&obj->v) == VT_DISPATCH) {
445 if (SUCCESS != php_com_do_invoke_by_id(obj, DISPID_VALUE,
446 DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, 0, NULL, 1, 0)) {
447 VariantCopy(&v, &obj->v);
448 }
449 } else {
450 VariantCopy(&v, &obj->v);
451 }
452
453 switch(type) {
454 case IS_LONG:
455 case _IS_NUMBER:
456#if SIZEOF_ZEND_LONG == 4
457 vt = VT_I4;
458#else
459 vt = VT_I8;
460#endif
461 break;
462 case IS_DOUBLE:
463 vt = VT_R8;
464 break;
465 case IS_FALSE:
466 case IS_TRUE:
467 case _IS_BOOL:
468 vt = VT_BOOL;
469 break;
470 case IS_STRING:
471 vt = VT_BSTR;
472 break;
473 default:
474 ;
475 }
476
477 if (vt != VT_EMPTY && vt != V_VT(&v)) {
478 res = VariantChangeType(&v, &v, 0, vt);
479 }
480
481 if (SUCCEEDED(res)) {
482 php_com_zval_from_variant(writeobj, &v, obj->code_page);
483 }
484
485 VariantClear(&v);
486
487 if (SUCCEEDED(res)) {
488 return SUCCESS;
489 }
490
491 return zend_std_cast_object_tostring(readobj, writeobj, type);
492}
493
494static zend_result com_object_count(zend_object *object, zend_long *count)
495{
497 LONG ubound = 0, lbound = 0;
498
499 obj = (php_com_dotnet_object*) object;
500
501 if (!V_ISARRAY(&obj->v)) {
502 return FAILURE;
503 }
504
505 SafeArrayGetLBound(V_ARRAY(&obj->v), 1, &lbound);
506 SafeArrayGetUBound(V_ARRAY(&obj->v), 1, &ubound);
507
508 *count = ubound - lbound + 1;
509
510 return SUCCESS;
511}
512
514 0,
518 com_property_read,
519 com_property_write,
520 com_read_dimension,
521 com_write_dimension,
522 com_get_property_ptr_ptr,
523 com_property_exists,
524 com_property_delete,
525 com_dimension_exists,
526 com_dimension_delete,
527 com_properties_get,
528 com_method_get,
530 com_class_name_get,
531 com_object_cast,
532 com_object_count,
533 NULL, /* get_debug_info */
534 NULL, /* get_closure */
535 com_get_gc, /* get_gc */
536 NULL, /* do_operation */
537 com_objects_compare, /* compare */
538 NULL, /* get_properties_for */
539};
540
542{
543 if (obj->sink_dispatch) {
544 IConnectionPointContainer *cont;
545 IConnectionPoint *point;
546
547 if (SUCCEEDED(IDispatch_QueryInterface(V_DISPATCH(&obj->v),
548 &IID_IConnectionPointContainer, (void**)&cont))) {
549
550 if (SUCCEEDED(IConnectionPointContainer_FindConnectionPoint(cont,
551 &obj->sink_id, &point))) {
552
553 if (enable) {
554 IConnectionPoint_Advise(point, (IUnknown*)obj->sink_dispatch, &obj->sink_cookie);
555 } else {
556 IConnectionPoint_Unadvise(point, obj->sink_cookie);
557 }
558 IConnectionPoint_Release(point);
559 }
560 IConnectionPointContainer_Release(cont);
561 }
562 }
563}
564
566{
568
569 if (obj->typeinfo) {
570 ITypeInfo_Release(obj->typeinfo);
571 obj->typeinfo = NULL;
572 }
573
574 if (obj->sink_dispatch) {
575 php_com_object_enable_event_sink(obj, /* enable */ false);
576 IDispatch_Release(obj->sink_dispatch);
577 obj->sink_dispatch = NULL;
578 }
579
580 VariantClear(&obj->v);
581
582 if (obj->method_cache) {
585 }
586 if (obj->id_of_name_cache) {
589 }
590
591 zend_object_std_dtor(object);
592}
593
595{
596 php_com_dotnet_object *cloneobj, *origobject;
597
598 origobject = (php_com_dotnet_object*) object;
600
601 memcpy(cloneobj, origobject, sizeof(*cloneobj));
602
603 /* VariantCopy will perform VariantClear; we don't want to clobber
604 * the IDispatch that we memcpy'd, so we init a new variant in the
605 * clone structure */
606 VariantInit(&cloneobj->v);
607 /* We use the Indirection-following version of the API since we
608 * want to clone as much as possible */
609 VariantCopyInd(&cloneobj->v, &origobject->v);
610
611 if (cloneobj->typeinfo) {
612 ITypeInfo_AddRef(cloneobj->typeinfo);
613 }
614
615 return (zend_object*)cloneobj;
616}
617
619{
621
623 obj = emalloc(sizeof(*obj));
624 memset(obj, 0, sizeof(*obj));
625
626 VariantInit(&obj->v);
627 obj->code_page = CP_ACP;
628 obj->ce = ce;
629
630 zend_object_std_init(&obj->zo, ce);
631
632 obj->typeinfo = NULL;
633
634 return (zend_object*)obj;
635}
count(Countable|array $value, int $mode=COUNT_NORMAL)
uint32_t v
Definition cdf.c:1237
zend_result php_com_do_invoke(php_com_dotnet_object *obj, zend_string *name, WORD flags, VARIANT *v, int nargs, zval *args, bool allow_noarg)
Definition com_com.c:631
zend_result php_com_do_invoke_by_id(php_com_dotnet_object *obj, DISPID dispid, WORD flags, VARIANT *v, int nargs, zval *args, bool silent, bool allow_noarg)
Definition com_com.c:584
HRESULT php_com_get_id_of_name(php_com_dotnet_object *obj, zend_string *name, DISPID *dispid)
Definition com_com.c:410
zend_result php_com_do_invoke_byref(php_com_dotnet_object *obj, zend_internal_function *f, WORD flags, VARIANT *v, int nargs, zval *args)
Definition com_com.c:456
const VT_BSTR
const DISP_E_BADINDEX
const VARCMP_EQ
const VT_DISPATCH
const VARCMP_LT
const CP_ACP
const VT_I4
const LOCALE_NEUTRAL
const VT_R8
const VT_VARIANT
const VT_EMPTY
const VT_ARRAY
const VARCMP_GT
const VT_I8
const VT_BOOL
void php_com_object_enable_event_sink(php_com_dotnet_object *obj, bool enable)
zend_object_handlers php_com_object_handlers
zend_object * php_com_object_new(zend_class_entry *ce)
void php_com_object_free_storage(zend_object *object)
zend_object * php_com_object_clone(zend_object *object)
PHP_COM_DOTNET_API bool php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1)
Definition com_misc.c:92
PHP_COM_DOTNET_API void php_com_wrap_variant(zval *z, VARIANT *v, int codepage)
Definition com_misc.c:67
void php_com_throw_exception(HRESULT code, char *message)
Definition com_misc.c:28
PHP_COM_DOTNET_API OLECHAR * php_com_string_to_olestring(const char *string, size_t string_len, int codepage)
Definition com_olechar.c:29
void php_com_saproxy_create(zend_object *com_object, zval *proxy_out, zval *index)
VARTYPE vt
PHP_COM_DOTNET_API zend_result php_com_zval_from_variant(zval *z, VARIANT *v, int codepage)
PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage)
#define DWORD
Definition exif.c:1762
zend_ffi_type * type
Definition ffi.c:3812
zval * zv
Definition ffi.c:3975
zend_long n
Definition ffi.c:4979
new_type kind
Definition ffi.c:4363
zend_string * res
Definition ffi.c:4692
memcpy(ptr1, ptr2, size)
memset(ptr, 0, type->size)
zend_long offset
#define NULL
Definition gdcache.h:45
#define SUCCESS
Definition hash_sha3.c:261
PHPAPI void php_com_initialize(void)
Definition main.c:2005
#define PHP_FUNCTION
Definition php.h:364
#define PHP_FN
Definition php.h:361
#define CDNO_FETCH(zv)
struct _php_com_dotnet_object php_com_dotnet_object
unsigned char key[REFLECTION_KEY_LEN]
zval rv
Definition session.c:1024
zend_string * name
Definition zend.h:149
zend_class_entry * scope
zend_string * function_name
zend_internal_arg_info * arg_info
zend_string * doc_comment
Definition file.h:439
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
Definition zend.c:1772
ZEND_API zend_result zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array)
Definition zend_API.c:50
#define ZEND_NUM_ARGS()
Definition zend_API.h:530
#define _ZEND_ARG_INFO_FLAGS(pass_by_ref, is_variadic, is_tentative)
Definition zend_API.h:126
#define getThis()
Definition zend_API.h:526
#define ecalloc(nmemb, size)
Definition zend_alloc.h:158
#define efree(ptr)
Definition zend_alloc.h:155
#define FREE_HASHTABLE(ht)
Definition zend_alloc.h:234
#define safe_emalloc(nmemb, size, offset)
Definition zend_alloc.h:154
#define ALLOC_HASHTABLE(ht)
Definition zend_alloc.h:231
#define emalloc(size)
Definition zend_alloc.h:151
struct _zval_struct zval
exit(string|int $status=0)
zend_string_release_ex(func->internal_function.function_name, 0)
execute_data func
zval * args
ZEND_API void zend_set_function_arg_flags(zend_function *func)
#define ZEND_INTERNAL_FUNCTION
#define EX(element)
#define ZEND_ACC_CALL_VIA_TRAMPOLINE
#define ZEND_ACC_CALL_VIA_HANDLER
struct _zend_arg_info zend_arg_info
struct _zend_internal_function zend_internal_function
union _zend_function zend_function
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
Definition zend_hash.c:1727
ZEND_API const HashTable zend_empty_array
Definition zend_hash.c:248
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
Definition zend_hash.h:108
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
ZEND_API zend_result zend_std_cast_object_tostring(zend_object *readobj, zval *writeobj, int type)
ZEND_API zend_function * zend_std_get_constructor(zend_object *zobj)
#define ZEND_COMPARE_OBJECTS_FALLBACK(op1, op2)
#define zend_free_trampoline(func)
ZEND_API void zend_objects_destroy_object(zend_object *object)
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_long(zval *op)
#define ZEND_ASSERT(c)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define IS_TRUE
Definition zend_types.h:603
#define ZVAL_STR(z, s)
#define IS_FALSE
Definition zend_types.h:602
#define ZVAL_NULL(z)
#define IS_STRING
Definition zend_types.h:606
struct _zend_array HashTable
Definition zend_types.h:386
#define IS_DOUBLE
Definition zend_types.h:605
#define Z_PTR_P(zval_p)
#define ZEND_TYPE_INIT_NONE(extra_flags)
Definition zend_types.h:280
@ FAILURE
Definition zend_types.h:61
#define IS_LONG
Definition zend_types.h:604
#define _IS_BOOL
Definition zend_types.h:629
ZEND_RESULT_CODE zend_result
Definition zend_types.h:64
#define _IS_NUMBER
Definition zend_types.h:630
struct _zend_object_handlers zend_object_handlers
Definition zend_types.h:88
#define Z_LVAL_P(zval_p)
Definition zend_types.h:966
#define ZVAL_COPY_VALUE(z, v)
zval * return_value
zend_string * name
zval * ret
value