php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
multi.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: Sterling Hughes <sterling@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
18
19#ifdef HAVE_CONFIG_H
20#include <config.h>
21#endif
22
23#include "php.h"
24#include "Zend/zend_smart_str.h"
25
26#include "curl_private.h"
27
28#include <curl/curl.h>
29#include <curl/multi.h>
30
31#ifdef HAVE_SYS_SELECT_H
32#include <sys/select.h>
33#endif
34
35#ifdef HAVE_SYS_TIME_H
36#include <sys/time.h>
37#endif
38
39#ifdef HAVE_SYS_TYPES_H
40#include <sys/types.h>
41#endif
42
43#ifdef HAVE_UNISTD_H
44#include <unistd.h>
45#endif
46
47#define SAVE_CURLM_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
48
49/* CurlMultiHandle class */
50
52
53static inline php_curlm *curl_multi_from_obj(zend_object *obj) {
54 return (php_curlm *)((char *)(obj) - XtOffsetOf(php_curlm, std));
55}
56
57#define Z_CURL_MULTI_P(zv) curl_multi_from_obj(Z_OBJ_P(zv))
58
59/* {{{ Returns a new cURL multi handle */
61{
62 php_curlm *mh;
63 CURLM *multi;
64
66 multi = curl_multi_init();
67 if (UNEXPECTED(multi == NULL)) {
68 zend_throw_error(NULL, "%s(): Could not initialize a new cURL multi handle", get_active_function_name());
70 }
73 mh->multi = multi;
74
76}
77/* }}} */
78
79/* {{{ Add a normal cURL handle to a cURL multi handle */
81{
82 zval *z_mh;
83 zval *z_ch;
84 php_curlm *mh;
85 php_curl *ch;
86 CURLMcode error = CURLM_OK;
87
92
93 mh = Z_CURL_MULTI_P(z_mh);
94 ch = Z_CURL_P(z_ch);
95
96 _php_curl_verify_handlers(ch, /* reporterror */ true);
97
99
102
103 if (error == CURLM_OK) {
104 Z_ADDREF_P(z_ch);
105 zend_llist_add_element(&mh->easyh, z_ch);
106 }
107
109}
110/* }}} */
111
113{
114 zval *z_ch = (zval *)data;
115
116 zval_ptr_dtor(z_ch);
117}
118/* }}} */
119
120/* Used internally as comparison routine passed to zend_list_del_element */
121static int curl_compare_objects( zval *z1, zval *z2 ) /* {{{ */
122{
123 return (Z_TYPE_P(z1) == Z_TYPE_P(z2) &&
124 Z_TYPE_P(z1) == IS_OBJECT &&
125 Z_OBJ_P(z1) == Z_OBJ_P(z2));
126}
127/* }}} */
128
129/* Used to find the php_curl resource for a given curl easy handle */
130static zval *_php_curl_multi_find_easy_handle(php_curlm *mh, CURL *easy) /* {{{ */
131{
132 php_curl *tmp_ch;
134 zval *pz_ch_temp;
135
136 for(pz_ch_temp = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch_temp;
137 pz_ch_temp = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) {
138 tmp_ch = Z_CURL_P(pz_ch_temp);
139
140 if (tmp_ch->cp == easy) {
141 return pz_ch_temp;
142 }
143 }
144
145 return NULL;
146}
147/* }}} */
148
149/* {{{ Remove a multi handle from a set of cURL handles */
151{
152 zval *z_mh;
153 zval *z_ch;
154 php_curlm *mh;
155 php_curl *ch;
156 CURLMcode error = CURLM_OK;
157
162
163 mh = Z_CURL_MULTI_P(z_mh);
164 ch = Z_CURL_P(z_ch);
165
168
169 if (error == CURLM_OK) {
170 zend_llist_del_element(&mh->easyh, z_ch, (int (*)(void *, void *))curl_compare_objects);
171 }
172
174}
175/* }}} */
176
177/* {{{ Get all the sockets associated with the cURL extension, which can then be "selected" */
179{
180 zval *z_mh;
181 php_curlm *mh;
182 double timeout = 1.0;
183 int numfds = 0;
184 CURLMcode error = CURLM_OK;
185
189 Z_PARAM_DOUBLE(timeout)
191
192 mh = Z_CURL_MULTI_P(z_mh);
193
194 if (!(timeout >= 0.0 && timeout <= ((double)INT_MAX / 1000.0))) {
195 zend_argument_value_error(2, "must be between 0 and %d", (int)ceilf((double)INT_MAX / 1000));
197 }
198
199 error = curl_multi_wait(mh->multi, NULL, 0, (int) (timeout * 1000.0), &numfds);
200 if (CURLM_OK != error) {
202 RETURN_LONG(-1);
203 }
204
205 RETURN_LONG(numfds);
206}
207/* }}} */
208
209/* {{{ Run the sub-connections of the current cURL handle */
211{
212 zval *z_mh;
213 zval *z_still_running;
214 php_curlm *mh;
215 int still_running;
216 CURLMcode error = CURLM_OK;
217
220 Z_PARAM_ZVAL(z_still_running)
222
223 mh = Z_CURL_MULTI_P(z_mh);
224
225 {
227 php_curl *ch;
228 zval *pz_ch;
229
230 for (pz_ch = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch;
231 pz_ch = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) {
232 ch = Z_CURL_P(pz_ch);
233
234 _php_curl_verify_handlers(ch, /* reporterror */ true);
235 }
236 }
237
238 still_running = zval_get_long(z_still_running);
239 error = curl_multi_perform(mh->multi, &still_running);
240 ZEND_TRY_ASSIGN_REF_LONG(z_still_running, still_running);
241
244}
245/* }}} */
246
247/* {{{ Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set */
249{
250 zval *z_ch;
251 php_curl *ch;
252
256
257 ch = Z_CURL_P(z_ch);
258
259 if (ch->handlers.write->method == PHP_CURL_RETURN) {
260 if (!ch->handlers.write->buf.s) {
262 }
263 smart_str_0(&ch->handlers.write->buf);
264 RETURN_STR_COPY(ch->handlers.write->buf.s);
265 }
266
267 RETURN_NULL();
268}
269/* }}} */
270
271/* {{{ Get information about the current transfers */
273{
274 zval *z_mh;
275 php_curlm *mh;
276 CURLMsg *tmp_msg;
277 int queued_msgs;
278 zval *zmsgs_in_queue = NULL;
279 php_curl *ch;
280
284 Z_PARAM_ZVAL(zmsgs_in_queue)
286
287 mh = Z_CURL_MULTI_P(z_mh);
288
289 tmp_msg = curl_multi_info_read(mh->multi, &queued_msgs);
290 if (tmp_msg == NULL) {
292 }
293
294 if (zmsgs_in_queue) {
295 ZEND_TRY_ASSIGN_REF_LONG(zmsgs_in_queue, queued_msgs);
296 }
297
299 add_assoc_long(return_value, "msg", tmp_msg->msg);
300 add_assoc_long(return_value, "result", tmp_msg->data.result);
301
302 /* find the original easy curl handle */
303 {
304 zval *pz_ch = _php_curl_multi_find_easy_handle(mh, tmp_msg->easy_handle);
305 if (pz_ch != NULL) {
306 /* we must save result to be able to read error message */
307 ch = Z_CURL_P(pz_ch);
308 SAVE_CURL_ERROR(ch, tmp_msg->data.result);
309
310 Z_ADDREF_P(pz_ch);
311 add_assoc_zval(return_value, "handle", pz_ch);
312 }
313 }
314}
315/* }}} */
316
317/* {{{ Close a set of cURL handles */
319{
320 php_curlm *mh;
321 zval *z_mh;
322
324 zval *pz_ch;
325
329
330 mh = Z_CURL_MULTI_P(z_mh);
331
332 for (pz_ch = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch;
333 pz_ch = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) {
334 php_curl *ch = Z_CURL_P(pz_ch);
335 _php_curl_verify_handlers(ch, /* reporterror */ true);
337 }
339}
340/* }}} */
341
342/* {{{ Return an integer containing the last multi curl error number */
356/* }}} */
357
358/* {{{ return string describing error code */
360{
361 zend_long code;
362 const char *str;
363
365 Z_PARAM_LONG(code)
367
368 str = curl_multi_strerror(code);
369 if (str) {
370 RETURN_STRING(str);
371 } else {
372 RETURN_NULL();
373 }
374}
375/* }}} */
376
377
378static int _php_server_push_callback(CURL *parent_ch, CURL *easy, size_t num_headers, struct curl_pushheaders *push_headers, void *userp) /* {{{ */
379{
380 php_curl *ch;
381 php_curl *parent;
382 php_curlm *mh = (php_curlm *)userp;
383 size_t rval = CURL_PUSH_DENY;
384 zval *pz_parent_ch = NULL;
385 zval pz_ch;
386 zval headers;
387 zval retval;
388
389 pz_parent_ch = _php_curl_multi_find_easy_handle(mh, parent_ch);
390 if (pz_parent_ch == NULL) {
391 return rval;
392 }
393
394 parent = Z_CURL_P(pz_parent_ch);
395
397 ch->cp = easy;
399
400 array_init(&headers);
401 for (size_t i = 0; i < num_headers; i++) {
402 char *header = curl_pushheader_bynum(push_headers, i);
403 add_next_index_string(&headers, header);
404 }
405
406 ZEND_ASSERT(pz_parent_ch);
407 zval call_args[3] = {*pz_parent_ch, pz_ch, headers};
408
409 zend_call_known_fcc(&mh->handlers.server_push, &retval, /* param_count */ 3, call_args, /* named_params */ NULL);
410 zval_ptr_dtor_nogc(&headers);
411
412 if (!Z_ISUNDEF(retval)) {
413 if (CURL_PUSH_DENY != zval_get_long(&retval)) {
414 rval = CURL_PUSH_OK;
415 zend_llist_add_element(&mh->easyh, &pz_ch);
416 } else {
417 /* libcurl will free this easy handle, avoid double free */
418 ch->cp = NULL;
419 }
420 }
421
422 return rval;
423}
424/* }}} */
425
426static bool _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue, zval *return_value) /* {{{ */
427{
428 CURLMcode error = CURLM_OK;
429
430 switch (option) {
438#if LIBCURL_VERSION_NUM >= 0x074300 /* Available since 7.67.0 */
440#endif
441 {
442 zend_long lval = zval_get_long(zvalue);
443
444 if (option == CURLMOPT_PIPELINING && (lval & 1)) {
445#if LIBCURL_VERSION_NUM >= 0x073e00 /* Available since 7.62.0 */
446 php_error_docref(NULL, E_WARNING, "CURLPIPE_HTTP1 is no longer supported");
447#else
448 php_error_docref(NULL, E_DEPRECATED, "CURLPIPE_HTTP1 is deprecated");
449#endif
450 }
451 error = curl_multi_setopt(mh->multi, option, lval);
452 break;
453 }
455 /* See php_curl_set_callable_handler */
457 zend_fcc_dtor(&mh->handlers.server_push);
458 }
459
460 char *error_str = NULL;
461 if (UNEXPECTED(!zend_is_callable_ex(zvalue, /* object */ NULL, /* check_flags */ 0, /* callable_name */ NULL, &mh->handlers.server_push, /* error */ &error_str))) {
462 if (!EG(exception)) {
463 zend_argument_type_error(2, "must be a valid callback for option CURLMOPT_PUSHFUNCTION, %s", error_str);
464 }
465 efree(error_str);
466 return false;
467 }
468 zend_fcc_addref(&mh->handlers.server_push);
469
470 error = curl_multi_setopt(mh->multi, CURLMOPT_PUSHFUNCTION, _php_server_push_callback);
471 if (error != CURLM_OK) {
472 return false;
473 }
474 error = curl_multi_setopt(mh->multi, CURLMOPT_PUSHDATA, mh);
475 break;
476 }
477 default:
478 zend_argument_value_error(2, "is not a valid cURL multi option");
479 error = CURLM_UNKNOWN_OPTION;
480 break;
481 }
482
484
485 return error == CURLM_OK;
486}
487/* }}} */
488
489/* {{{ Set an option for the curl multi handle */
491{
492 zval *z_mh, *zvalue;
494 php_curlm *mh;
495
499 Z_PARAM_ZVAL(zvalue)
501
502 mh = Z_CURL_MULTI_P(z_mh);
503
504 if (_php_curl_multi_setopt(mh, options, zvalue, return_value)) {
506 } else {
508 }
509}
510/* }}} */
511
512/* CurlMultiHandle class */
513
514static zend_object *curl_multi_create_object(zend_class_entry *class_type) {
515 php_curlm *intern = zend_object_alloc(sizeof(php_curlm), class_type);
516
517 zend_object_std_init(&intern->std, class_type);
518 object_properties_init(&intern->std, class_type);
519
520 return &intern->std;
521}
522
523static zend_function *curl_multi_get_constructor(zend_object *object) {
524 zend_throw_error(NULL, "Cannot directly construct CurlMultiHandle, use curl_multi_init() instead");
525 return NULL;
526}
527
528static void curl_multi_free_obj(zend_object *object)
529{
530 php_curlm *mh = curl_multi_from_obj(object);
531
533 php_curl *ch;
534 zval *pz_ch;
535
536 if (!mh->multi) {
537 /* Can happen if constructor throws. */
539 return;
540 }
541
542 for (pz_ch = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch;
543 pz_ch = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) {
544 if (!(OBJ_FLAGS(Z_OBJ_P(pz_ch)) & IS_OBJ_FREE_CALLED)) {
545 ch = Z_CURL_P(pz_ch);
546 _php_curl_verify_handlers(ch, /* reporterror */ false);
547 }
548 }
549
550 curl_multi_cleanup(mh->multi);
552
554 zend_fcc_dtor(&mh->handlers.server_push);
555 }
556
558}
559
560static HashTable *curl_multi_get_gc(zend_object *object, zval **table, int *n)
561{
562 php_curlm *curl_multi = curl_multi_from_obj(object);
563
565
566 if (ZEND_FCC_INITIALIZED(curl_multi->handlers.server_push)) {
567 zend_get_gc_buffer_add_fcc(gc_buffer, &curl_multi->handlers.server_push);
568 }
569
571 for (zval *pz_ch = (zval *) zend_llist_get_first_ex(&curl_multi->easyh, &pos); pz_ch;
572 pz_ch = (zval *) zend_llist_get_next_ex(&curl_multi->easyh, &pos)) {
573 zend_get_gc_buffer_add_zval(gc_buffer, pz_ch);
574 }
575
576 zend_get_gc_buffer_use(gc_buffer, table, n);
577
578 return zend_std_get_properties(object);
579}
580
581static zend_object_handlers curl_multi_handlers;
582
584 curl_multi_ce->create_object = curl_multi_create_object;
585 curl_multi_ce->default_object_handlers = &curl_multi_handlers;
586
587 memcpy(&curl_multi_handlers, &std_object_handlers, sizeof(zend_object_handlers));
588 curl_multi_handlers.offset = XtOffsetOf(php_curlm, std);
589 curl_multi_handlers.free_obj = curl_multi_free_obj;
590 curl_multi_handlers.get_gc = curl_multi_get_gc;
591 curl_multi_handlers.get_constructor = curl_multi_get_constructor;
592 curl_multi_handlers.clone_obj = NULL;
593 curl_multi_handlers.cast_object = curl_cast_object;
594 curl_multi_handlers.compare = zend_objects_not_comparable;
595}
bool exception
Definition assert.c:30
header(string $header, bool $replace=true, int $response_code=0)
zend_class_entry * curl_ce
Definition interface.c:228
curl_multi_select(CurlMultiHandle $multi_handle, float $timeout=1.0)
const CURLMOPT_MAXCONNECTS
const CURLMOPT_PUSHFUNCTION
const CURLMOPT_MAX_PIPELINE_LENGTH
const CURL_PUSH_DENY
const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
const CURL_PUSH_OK
curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value)
curl_multi_exec(CurlMultiHandle $multi_handle, &$still_running)
const CURLM_OK
curl_multi_close(CurlMultiHandle $multi_handle)
curl_multi_errno(CurlMultiHandle $multi_handle)
curl_multi_strerror(int $error_code)
const CURLMOPT_MAX_TOTAL_CONNECTIONS
const CURLMOPT_MAX_CONCURRENT_STREAMS
const CURLMOPT_MAX_HOST_CONNECTIONS
curl_multi_add_handle(CurlMultiHandle $multi_handle, CurlHandle $handle)
const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
curl_multi_init()
curl_multi_getcontent(CurlHandle $handle)
curl_multi_remove_handle(CurlMultiHandle $multi_handle, CurlHandle $handle)
const CURLMOPT_PIPELINING
curl_multi_info_read(CurlMultiHandle $multi_handle, &$queued_messages=null)
#define Z_CURL_P(zv)
#define SAVE_CURL_ERROR(__handle, __err)
php_curl * init_curl_handle_into_zval(zval *curl)
Definition interface.c:1110
void _php_curl_multi_cleanup_list(void *data)
Definition multi.c:112
#define PHP_CURL_RETURN
zend_result curl_cast_object(zend_object *obj, zval *result, int type)
Definition interface.c:530
void _php_curl_cleanup_handle(php_curl *)
Definition interface.c:2404
void _php_curl_verify_handlers(php_curl *ch, bool reporterror)
Definition interface.c:143
void _php_setup_easy_copy_handlers(php_curl *ch, php_curl *source)
Definition interface.c:1263
error($message)
Definition ext_skel.php:22
zend_long ch
Definition ffi.c:4580
zend_long n
Definition ffi.c:4979
memcpy(ptr1, ptr2, size)
#define NULL
Definition gdcache.h:45
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format,...)
Definition main.c:1173
void curl_multi_register_handlers(void)
Definition multi.c:583
void _php_curl_multi_cleanup_list(void *data)
Definition multi.c:112
#define SAVE_CURLM_ERROR(__handle, __err)
Definition multi.c:47
#define Z_CURL_MULTI_P(zv)
Definition multi.c:57
zend_class_entry * curl_multi_ce
Definition multi.c:51
#define PHP_FUNCTION
Definition php.h:364
#define INT_MAX
Definition php.h:237
unsigned const char * pos
Definition php_ffi.h:52
PHP_JSON_API size_t int options
Definition php_json.h:102
zend_constant * data
CURL * cp
zend_fcall_info_cache server_push
zend_llist easyh
CURLM * multi
zend_object std
php_curlm_handlers handlers
struct php_curlm::@376371063142164024322336236347115231202062012263 err
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
Definition zend.c:1772
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type)
Definition zend_API.c:1849
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
Definition zend_API.c:1688
ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error)
Definition zend_API.c:4271
ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *format,...)
Definition zend_API.c:433
ZEND_API ZEND_COLD void zend_argument_type_error(uint32_t arg_num, const char *format,...)
Definition zend_API.c:423
ZEND_API zend_result add_next_index_string(zval *arg, const char *str)
Definition zend_API.c:2186
#define RETURN_STRING(s)
Definition zend_API.h:1043
#define ZEND_PARSE_PARAMETERS_END()
Definition zend_API.h:1641
#define RETURN_FALSE
Definition zend_API.h:1058
#define ZEND_PARSE_PARAMETERS_NONE()
Definition zend_API.h:1623
#define RETURN_NULL()
Definition zend_API.h:1036
#define Z_PARAM_OPTIONAL
Definition zend_API.h:1667
#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args)
Definition zend_API.h:1620
#define ZEND_TRY_ASSIGN_REF_LONG(zv, lval)
Definition zend_API.h:1205
#define Z_PARAM_LONG(dest)
Definition zend_API.h:1896
#define RETURN_LONG(l)
Definition zend_API.h:1037
#define RETURN_THROWS()
Definition zend_API.h:1060
#define Z_PARAM_DOUBLE(dest)
Definition zend_API.h:1803
#define ZEND_FCC_INITIALIZED(fcc)
Definition zend_API.h:341
#define Z_PARAM_OBJECT_OF_CLASS(dest, _ce)
Definition zend_API.h:1976
#define RETURN_EMPTY_STRING()
Definition zend_API.h:1047
#define Z_PARAM_ZVAL(dest)
Definition zend_API.h:2100
#define RETURN_TRUE
Definition zend_API.h:1059
#define RETURN_STR_COPY(s)
Definition zend_API.h:1042
#define array_init(arg)
Definition zend_API.h:537
#define efree(ptr)
Definition zend_alloc.h:155
struct _zval_struct zval
#define E_WARNING
Definition zend_errors.h:24
#define E_DEPRECATED
Definition zend_errors.h:37
ZEND_API const char * get_active_function_name(void)
union _zend_function zend_function
ZEND_API zend_get_gc_buffer * zend_get_gc_buffer_create(void)
Definition zend_gc.c:2130
#define EG(v)
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int(*compare)(void *element1, void *element2))
Definition zend_llist.c:88
ZEND_API void zend_llist_add_element(zend_llist *l, const void *element)
Definition zend_llist.c:34
ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent)
Definition zend_llist.c:24
ZEND_API void zend_llist_clean(zend_llist *l)
Definition zend_llist.c:121
ZEND_API void * zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
Definition zend_llist.c:286
ZEND_API void * zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
Definition zend_llist.c:260
zend_llist_element * zend_llist_position
Definition zend_llist.h:47
int32_t zend_long
Definition zend_long.h:42
ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2)
ZEND_API HashTable * zend_std_get_properties(zend_object *zobj)
ZEND_API const zend_object_handlers std_object_handlers
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)
#define XtOffsetOf(s_type, field)
#define ZEND_ASSERT(c)
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define Z_TYPE_P(zval_p)
Definition zend_types.h:660
struct _zend_array HashTable
Definition zend_types.h:386
#define Z_OBJ_P(zval_p)
Definition zend_types.h:990
#define IS_OBJ_FREE_CALLED
Definition zend_types.h:829
#define Z_ISUNDEF(zval)
Definition zend_types.h:956
#define Z_ADDREF_P(pz)
#define IS_OBJECT
Definition zend_types.h:608
struct _zend_object_handlers zend_object_handlers
Definition zend_types.h:88
#define OBJ_FLAGS(obj)
Definition zend_types.h:831
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
zval retval
zval * return_value
zval * call_args