23#include "zend_language_parser.h"
31static inline void *zend_ast_alloc(
size_t size) {
32 return zend_arena_alloc(&
CG(ast_arena),
size);
35static inline void *zend_ast_realloc(
void *old,
size_t old_size,
size_t new_size) {
36 void *
new = zend_ast_alloc(new_size);
37 memcpy(
new, old, old_size);
41static inline size_t zend_ast_list_size(uint32_t children) {
68 return zend_ast_create_zval_int(
zv, 0, lineno);
72 return zend_ast_create_zval_int(
zv,
attr,
CG(zend_lineno));
76 return zend_ast_create_zval_int(
zv, 0,
CG(zend_lineno));
82 return zend_ast_create_zval_int(&
zv, 0,
CG(zend_lineno));
88 return zend_ast_create_zval_int(&
zv, 0,
CG(zend_lineno));
105 zend_string_release(name_str);
126 ast->
child[0] = child0;
127 ast->
child[1] = child1;
128 ast->
child[2] = child2;
129 ast->
child[3] = child3;
130 ast->
child[4] = child4;
140 ast = zend_ast_alloc(zend_ast_size(0));
153 ast = zend_ast_alloc(zend_ast_size(1));
156 ast->
child[0] = child;
158 lineno = zend_ast_get_lineno(child);
160 lineno =
CG(zend_lineno);
172 ast = zend_ast_alloc(zend_ast_size(2));
175 ast->
child[0] = child1;
176 ast->
child[1] = child2;
178 lineno = zend_ast_get_lineno(child1);
180 lineno = zend_ast_get_lineno(child2);
182 lineno =
CG(zend_lineno);
194 ast = zend_ast_alloc(zend_ast_size(3));
197 ast->
child[0] = child1;
198 ast->
child[1] = child2;
199 ast->
child[2] = child3;
201 lineno = zend_ast_get_lineno(child1);
203 lineno = zend_ast_get_lineno(child2);
205 lineno = zend_ast_get_lineno(child3);
207 lineno =
CG(zend_lineno);
219 ast = zend_ast_alloc(zend_ast_size(4));
222 ast->
child[0] = child1;
223 ast->
child[1] = child2;
224 ast->
child[2] = child3;
225 ast->
child[3] = child4;
227 lineno = zend_ast_get_lineno(child1);
229 lineno = zend_ast_get_lineno(child2);
231 lineno = zend_ast_get_lineno(child3);
233 lineno = zend_ast_get_lineno(child4);
235 lineno =
CG(zend_lineno);
247 ast = zend_ast_alloc(zend_ast_size(5));
250 ast->
child[0] = child1;
251 ast->
child[1] = child2;
252 ast->
child[2] = child3;
253 ast->
child[3] = child4;
254 ast->
child[4] = child5;
256 lineno = zend_ast_get_lineno(child1);
258 lineno = zend_ast_get_lineno(child2);
260 lineno = zend_ast_get_lineno(child3);
262 lineno = zend_ast_get_lineno(child4);
264 lineno = zend_ast_get_lineno(child5);
266 lineno =
CG(zend_lineno);
275 uint32_t lineno = (uint32_t)-1;
277 zend_ast *ast = zend_ast_alloc(zend_ast_size(children));
280 for (uint32_t i = 0; i < children; i++) {
282 if (lineno != (uint32_t)-1 && ast->
child[i]) {
283 lineno = zend_ast_get_lineno(ast->
child[i]);
286 if (lineno == (uint32_t)-1) {
287 lineno =
CG(zend_lineno);
314 ast = zend_ast_alloc(zend_ast_list_size(4));
329 ast = zend_ast_alloc(zend_ast_list_size(4));
334 list->
child[0] = child;
336 lineno = zend_ast_get_lineno(child);
337 if (lineno >
CG(zend_lineno)) {
338 lineno =
CG(zend_lineno);
341 lineno =
CG(zend_lineno);
353 ast = zend_ast_alloc(zend_ast_list_size(4));
358 list->
child[0] = child1;
359 list->
child[1] = child2;
361 lineno = zend_ast_get_lineno(child1);
362 if (lineno >
CG(zend_lineno)) {
363 lineno =
CG(zend_lineno);
366 lineno = zend_ast_get_lineno(child2);
367 if (lineno >
CG(zend_lineno)) {
368 lineno =
CG(zend_lineno);
372 lineno =
CG(zend_lineno);
383 ast = zend_ast_alloc(zend_ast_size(children));
386 ast->
lineno = (uint32_t) -1;
388 for (i = 0; i < children; ++i) {
391 uint32_t lineno = zend_ast_get_lineno(ast->
child[i]);
392 if (lineno < ast->lineno) {
398 if (ast->
lineno == UINT_MAX) {
410 ast = zend_ast_create_from_va_list(
kind,
attr, va);
421 ast = zend_ast_create_from_va_list(
kind, 0, va);
431 ast = zend_ast_alloc(zend_ast_list_size(4));
442 for (i = 0; i < init_children; ++i) {
446 uint32_t lineno = zend_ast_get_lineno(child);
447 if (lineno < ast->lineno) {
461 zval *zv0 = zend_ast_get_zval(op0);
462 zval *zv1 = zend_ast_get_zval(
op1);
465 zval_ptr_dtor_nogc(zv1);
472static inline bool is_power_of_two(uint32_t
n) {
473 return ((
n != 0) && (
n == (
n & (~
n + 1))));
479 list = zend_ast_realloc(list,
480 zend_ast_list_size(list->
children), zend_ast_list_size(list->
children * 2));
491 "Cannot add element to the array as the next element is already occupied");
501 zval_ptr_dtor_nogc(
offset);
502 zval_ptr_dtor_nogc(expr);
518 "Cannot add element to the array as the next element is already occupied");
540 bool *short_circuited_ptr,
548 bool *short_circuited_ptr,
554 previous_filename =
EG(filename_override);
555 previous_lineno =
EG(lineno_override);
556 EG(filename_override) =
scope->info.user.filename;
557 EG(lineno_override) = zend_ast_get_lineno(ast);
561 EG(filename_override) = previous_filename;
562 EG(lineno_override) = previous_lineno;
571 bool *short_circuited_ptr,
576 bool short_circuited;
577 *short_circuited_ptr =
false;
584 zval_ptr_dtor_nogc(&
op1);
589 zval_ptr_dtor_nogc(&
op1);
590 zval_ptr_dtor_nogc(&
op2);
598 zval_ptr_dtor_nogc(&
op1);
605 zval_ptr_dtor_nogc(&
op1);
606 zval_ptr_dtor_nogc(&
op2);
616 zval_ptr_dtor_nogc(&
op1);
621 zval *
zv = zend_ast_get_zval(ast);
653 if (!
scope->parent) {
655 "Cannot use \"parent\" when current class scope has no parent");
660 ZEND_ASSERT(0 &&
"Should have errored during compilation");
670 zval_ptr_dtor_nogc(&
op1);
675 zval_ptr_dtor_nogc(&
op2);
679 zval_ptr_dtor_nogc(&
op1);
690 zval_ptr_dtor_nogc(&
op1);
695 zval_ptr_dtor_nogc(&
op2);
697 zval_ptr_dtor_nogc(&
op1);
705 if (!ast->
child[1]) {
709 zval_ptr_dtor_nogc(&
op1);
713 zval_ptr_dtor_nogc(&
op1);
717 zval_ptr_dtor_nogc(&
op1);
721 zval_ptr_dtor_nogc(&
op1);
733 zval_ptr_dtor_nogc(&
op1);
737 zval_ptr_dtor_nogc(&
op1);
746 zval_ptr_dtor_nogc(&
op2);
755 zval_ptr_dtor_nogc(&
op2);
768 for (i = 0; i < list->
children; i++) {
772 zval_ptr_dtor_nogc(
result);
776 zval_ptr_dtor_nogc(&
op1);
777 zval_ptr_dtor_nogc(
result);
780 zval_ptr_dtor_nogc(&
op1);
783 if (elem->
child[1]) {
785 zval_ptr_dtor_nogc(
result);
792 zval_ptr_dtor_nogc(&
op1);
793 zval_ptr_dtor_nogc(
result);
797 zval_ptr_dtor_nogc(&
op1);
798 zval_ptr_dtor_nogc(&
op2);
799 zval_ptr_dtor_nogc(
result);
814 if (short_circuited) {
815 *short_circuited_ptr =
true;
822 zval_ptr_dtor_nogc(&
op1);
829 zval_ptr_dtor_nogc(&
op1);
836 zval_ptr_dtor_nogc(&
op1);
837 zval_ptr_dtor_nogc(&
op2);
847 if (
CG(in_compilation)) {
852 zend_string *class_name = zend_ast_get_str(class_name_ast);
855 zend_string *case_name = zend_ast_get_str(case_name_ast);
861 if (case_value_ast !=
NULL) {
869 zval_ptr_dtor_nogc(&case_value_zv);
880 zval_ptr_dtor_nogc(&
op2);
888 previous_filename =
EG(filename_override);
889 previous_lineno =
EG(lineno_override);
890 EG(filename_override) =
scope->info.user.filename;
891 EG(lineno_override) = zend_ast_get_lineno(ast);
895 EG(filename_override) = previous_filename;
896 EG(lineno_override) = previous_lineno;
901 zval_ptr_dtor_nogc(&
op2);
905 zval_ptr_dtor_nogc(&
op2);
923 if (args_ast->
attr) {
926 for (uint32_t i = 0; i < args_ast->
children; i++) {
931 name = zend_ast_get_str(arg_ast->
child[0]);
932 arg_ast = arg_ast->
child[1];
942 "Named parameter $%s overwrites previous argument",
963 for (uint32_t i = 0; i < args_ast->
children; i++) {
965 for (uint32_t
j = 0;
j < i;
j++) {
976 zend_call_known_instance_method(
980 for (uint32_t i = 0; i < args_ast->
children; i++) {
999 if (short_circuited) {
1000 *short_circuited_ptr =
true;
1005 *short_circuited_ptr =
true;
1011 zval_ptr_dtor_nogc(&
op1);
1015 if (!try_convert_to_string(&
op2)) {
1016 zval_ptr_dtor_nogc(&
op1);
1017 zval_ptr_dtor_nogc(&
op2);
1024 zval_ptr_dtor_nogc(&
op1);
1025 zval_ptr_dtor_nogc(&
op2);
1033 zend_throw_error(
NULL,
"Fetching properties on non-enums in constant expressions is not allowed");
1034 zval_ptr_dtor_nogc(&
op1);
1035 zval_ptr_dtor_nogc(&
op2);
1042 zval_ptr_dtor_nogc(&
op1);
1043 zval_ptr_dtor_nogc(&
op2);
1047 if (
result != property_result) {
1050 zval_ptr_dtor_nogc(&
op1);
1051 zval_ptr_dtor_nogc(&
op2);
1064 bool short_circuited;
1074 }
else if (zend_ast_is_list(ast)) {
1079 for (i = 0; i < list->
children; i++) {
1080 if (list->
child[i]) {
1081 size += zend_ast_tree_size(list->
child[i]);
1085 uint32_t i, children = zend_ast_get_num_children(ast);
1087 size = zend_ast_size(children);
1088 for (i = 0; i < children; i++) {
1089 if (ast->
child[i]) {
1090 size += zend_ast_tree_size(ast->
child[i]);
1102 new->attr = ast->
attr;
1103 ZVAL_COPY(&new->val, zend_ast_get_zval(ast));
1104 Z_LINENO(new->val) = zend_ast_get_lineno(ast);
1109 new->attr = ast->
attr;
1111 Z_LINENO(new->val) = zend_ast_get_lineno(ast);
1113 }
else if (zend_ast_is_list(ast)) {
1117 new->kind = list->
kind;
1118 new->attr = list->
attr;
1120 new->lineno = list->
lineno;
1122 for (i = 0; i < list->
children; i++) {
1123 if (list->
child[i]) {
1127 new->child[i] =
NULL;
1131 uint32_t i, children = zend_ast_get_num_children(ast);
1133 new->kind = ast->
kind;
1134 new->attr = ast->
attr;
1135 new->lineno = ast->
lineno;
1136 buf = (
void*)((
char*)
buf + zend_ast_size(children));
1137 for (i = 0; i < children; i++) {
1138 if (ast->
child[i]) {
1142 new->child[i] =
NULL;
1155 tree_size = zend_ast_tree_size(ast) +
sizeof(
zend_ast_ref);
1157 zend_ast_tree_copy(ast,
GC_AST(ref));
1171 uint32_t i, children = zend_ast_get_num_children(ast);
1173 for (i = 1; i < children; i++) {
1176 ast = ast->
child[0];
1179 zval_ptr_dtor_nogc(zend_ast_get_zval(ast));
1180 }
else if (
EXPECTED(zend_ast_is_list(ast))) {
1185 for (i = 1; i < list->
children; i++) {
1188 ast = list->
child[0];
1206 ast = decl->
child[4];
1218 if (zend_ast_is_list(ast)) {
1221 for (i = 0; i < list->
children; ++i) {
1225 uint32_t i, children = zend_ast_get_num_children(ast);
1226 for (i = 0; i < children; ++i) {
1276 if (c ==
'\'' || c ==
'\\') {
1277 smart_str_appendc(str,
'\\');
1278 smart_str_appendc(str, c);
1280 smart_str_appendc(str, c);
1294 smart_str_appends(str,
"\\n");
1297 smart_str_appends(str,
"\\r");
1300 smart_str_appends(str,
"\\t");
1303 smart_str_appends(str,
"\\f");
1306 smart_str_appends(str,
"\\v");
1313 smart_str_appends(str,
"\\e");
1316 smart_str_appends(str,
"\\0");
1317 smart_str_appendc(str,
'0' + (c / 8));
1318 smart_str_appendc(str,
'0' + (c % 8));
1322 if (c == quote || c ==
'$' || c ==
'\\') {
1323 smart_str_appendc(str,
'\\');
1325 smart_str_appendc(str, c);
1332 while (indent > 0) {
1333 smart_str_appends(str,
" ");
1341 zval *
zv = zend_ast_get_zval(ast);
1348 zend_ast_export_ex(str, ast, priority, indent);
1354 zval *
zv = zend_ast_get_zval(ast);
1358 smart_str_appendc(str,
'\\');
1360 smart_str_appends(str,
"namespace\\");
1366 zend_ast_export_ex(str, ast, priority, indent);
1369static ZEND_COLD bool zend_ast_valid_var_char(
char ch)
1371 unsigned char c = (
unsigned char)
ch;
1373 if (c !=
'_' && c < 127 &&
1374 (c <
'0' || c >
'9') &&
1375 (c <
'A' || c >
'Z') &&
1376 (c <
'a' || c >
'z')) {
1382static ZEND_COLD bool zend_ast_valid_var_name(
const char *
s,
size_t len)
1390 c = (
unsigned char)
s[0];
1391 if (c !=
'_' && c < 127 &&
1392 (c <
'A' || c >
'Z') &&
1393 (c <
'a' || c >
'z')) {
1396 for (i = 1; i <
len; i++) {
1397 c = (
unsigned char)
s[i];
1398 if (c !=
'_' && c < 127 &&
1399 (c <
'0' || c >
'9') &&
1400 (c <
'A' || c >
'Z') &&
1401 (c <
'a' || c >
'z')) {
1408static ZEND_COLD bool zend_ast_var_needs_braces(
char ch)
1410 return ch ==
'[' || zend_ast_valid_var_char(
ch);
1416 zval *
zv = zend_ast_get_zval(ast);
1423 zend_ast_export_ex(str, ast, 0, indent);
1426 smart_str_appendc(str,
'{');
1427 zend_ast_export_name(str, ast, 0, indent);
1428 smart_str_appendc(str,
'}');
1435 while (i < list->children) {
1436 if (i != 0 && separator) {
1437 smart_str_appends(str,
", ");
1439 zend_ast_export_ex(str, list->
child[i], priority, indent);
1449 while (i < list->children) {
1450 ast = list->
child[i];
1452 zval *
zv = zend_ast_get_zval(ast);
1455 zend_ast_export_qstr(str, quote,
Z_STR_P(
zv));
1460 !zend_ast_var_needs_braces(
1462 zend_ast_get_zval(list->
child[i + 1]))))) {
1463 zend_ast_export_ex(str, ast, 0, indent);
1465 smart_str_appendc(str,
'{');
1466 zend_ast_export_ex(str, ast, 0, indent);
1467 smart_str_appendc(str,
'}');
1477 while (i < list->children) {
1479 smart_str_appends(str, separator);
1481 zend_ast_export_name(str, list->
child[i], 0, indent);
1486#define zend_ast_export_name_list(s, l, i) zend_ast_export_name_list_ex(s, l, i, ", ")
1487#define zend_ast_export_catch_name_list(s, l, i) zend_ast_export_name_list_ex(s, l, i, "|")
1493 while (i < list->children) {
1495 smart_str_appends(str,
", ");
1498 smart_str_appendc(str,
'&');
1500 smart_str_appendc(str,
'$');
1501 zend_ast_export_name(str, list->
child[i], 20, indent);
1517 while (i < list->children) {
1518 ast = list->
child[i];
1519 zend_ast_export_stmt(str, ast, indent);
1523 zend_ast_export_indent(str, indent);
1524 zend_ast_export_ex(str, ast, 0, indent);
1525 switch (ast->
kind) {
1541 zend_ast *first_prop = zend_ast_get_list(ast->
child[1])->child[0];
1543 if (hook_list ==
NULL) {
1544 smart_str_appendc(str,
';');
1549 smart_str_appendc(str,
';');
1552 smart_str_appendc(str,
'\n');
1563 while (i < list->children) {
1564 ast = list->
child[i];
1566 if (ast->
child[0]) {
1568 smart_str_appends(str,
"if (");
1570 zend_ast_export_indent(str, indent);
1571 smart_str_appends(str,
"} elseif (");
1573 zend_ast_export_ex(str, ast->
child[0], 0, indent);
1574 smart_str_appends(str,
") {\n");
1575 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
1577 zend_ast_export_indent(str, indent);
1578 smart_str_appends(str,
"} else ");
1583 smart_str_appends(str,
"{\n");
1584 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
1589 zend_ast_export_indent(str, indent);
1590 smart_str_appendc(str,
'}');
1598 smart_str_appends(str,
"null");
1601 smart_str_appends(str,
"false");
1604 smart_str_appends(str,
"true");
1614 smart_str_appendc(str,
'\'');
1616 smart_str_appendc(str,
'\'');
1623 smart_str_appendc(str,
'[');
1628 smart_str_appends(str,
", ");
1631 smart_str_appendc(str,
'\'');
1632 zend_ast_export_str(str,
key);
1633 smart_str_appends(str,
"' => ");
1635 smart_str_append_long(str, idx);
1636 smart_str_appends(str,
" => ");
1638 zend_ast_export_zval(str,
val, 0, indent);
1640 smart_str_appendc(str,
']');
1644 zend_ast_export_ex(str,
Z_ASTVAL_P(
zv), priority, indent);
1651 if (decl->
child[0]) {
1652 smart_str_appends(str,
" extends ");
1653 zend_ast_export_ns_name(str, decl->
child[0], 0, indent);
1655 if (decl->
child[1]) {
1656 smart_str_appends(str,
" implements ");
1657 zend_ast_export_ex(str, decl->
child[1], 0, indent);
1659 smart_str_appends(str,
" {\n");
1660 zend_ast_export_stmt(str, decl->
child[2], indent + 1);
1661 zend_ast_export_indent(str, indent);
1662 smart_str_appends(str,
"}");
1667 for (uint32_t i = 0; i < list->
children; i++) {
1671 smart_str_appends(str,
", ");
1673 zend_ast_export_ns_name(str,
attr->child[0], 0, indent);
1675 if (
attr->child[1]) {
1676 smart_str_appendc(str,
'(');
1677 zend_ast_export_ex(str,
attr->child[1], 0, indent);
1678 smart_str_appendc(str,
')');
1687 for (i = 0; i < list->
children; i++) {
1688 smart_str_appends(str,
"#[");
1689 zend_ast_export_attribute_group(str, list->
child[i], indent);
1690 smart_str_appends(str,
"]");
1693 smart_str_appendc(str,
'\n');
1694 zend_ast_export_indent(str, indent);
1696 smart_str_appendc(str,
' ');
1703 smart_str_appends(str,
"public ");
1705 smart_str_appends(str,
"protected ");
1707 smart_str_appends(str,
"private ");
1712 smart_str_appends(str,
"private(set) ");
1714 smart_str_appends(str,
"protected(set) ");
1716 smart_str_appends(str,
"public(set) ");
1724 for (uint32_t i = 0; i < list->
children; i++) {
1726 smart_str_appendc(str,
'|');
1728 zend_ast_export_type(str, list->
child[i], indent);
1734 for (uint32_t i = 0; i < list->
children; i++) {
1736 smart_str_appendc(str,
'&');
1738 zend_ast_export_type(str, list->
child[i], indent);
1743 smart_str_appendc(str,
'?');
1745 zend_ast_export_ns_name(str, ast, 0, indent);
1750 smart_str_appends(str,
" {");
1751 smart_str_appendc(str,
'\n');
1753 zend_ast_export_indent(str, indent);
1755 for (uint32_t i = 0; i < hook_list->
children; i++) {
1759 smart_str_appends(str,
"final ");
1761 smart_str_append(str, hook->name);
1764 smart_str_appendc(str,
';');
1766 smart_str_appends(str,
" => ");
1767 zend_ast_export_ex(str,
body->child[0], 0, indent);
1768 smart_str_appendc(str,
';');
1770 smart_str_appends(str,
" {\n");
1771 zend_ast_export_stmt(str,
body, indent + 1);
1772 zend_ast_export_indent(str, indent);
1773 smart_str_appendc(str,
'}');
1775 if (i < (hook_list->
children - 1)) {
1776 smart_str_appendc(str,
'\n');
1777 zend_ast_export_indent(str, indent);
1780 smart_str_appendc(str,
'\n');
1782 zend_ast_export_indent(str, indent);
1783 smart_str_appendc(str,
'}');
1786#define BINARY_OP(_op, _p, _pl, _pr) do { \
1794#define PREFIX_OP(_op, _p, _pl) do { \
1801#define FUNC_OP(_op) do { \
1806#define POSTFIX_OP(_op, _p, _pl) do { \
1813#define APPEND_NODE_1(_op) do { \
1815 goto append_node_1; \
1818#define APPEND_STR(_op) do { \
1823#define APPEND_DEFAULT_VALUE(n) do { \
1825 goto append_default_value; \
1838 switch (ast->
kind) {
1841 zend_ast_export_zval(str, zend_ast_get_zval(ast), priority, indent);
1849 smart_str_appendl(str,
"__CLASS__",
sizeof(
"__CLASS__")-1);
1862 if (decl->
child[4]) {
1864 zend_ast_export_attributes(str, decl->
child[4], indent, newlines);
1870 smart_str_appends(str,
"static ");
1873 smart_str_appends(str,
"abstract ");
1876 smart_str_appends(str,
"final ");
1879 smart_str_appends(str,
"fn");
1881 smart_str_appends(str,
"function ");
1884 smart_str_appendc(str,
'&');
1889 smart_str_appendc(str,
'(');
1890 zend_ast_export_ex(str, decl->
child[0], 0, indent);
1891 smart_str_appendc(str,
')');
1892 zend_ast_export_ex(str, decl->
child[1], 0, indent);
1893 if (decl->
child[3]) {
1894 smart_str_appends(str,
": ");
1895 zend_ast_export_type(str, decl->
child[3], indent);
1897 if (decl->
child[2]) {
1903 smart_str_appends(str,
" => ");
1904 zend_ast_export_ex(str,
body, 0, indent);
1908 smart_str_appends(str,
" {\n");
1909 zend_ast_export_stmt(str, decl->
child[2], indent + 1);
1910 zend_ast_export_indent(str, indent);
1911 smart_str_appendc(str,
'}');
1913 smart_str_appendc(str,
'\n');
1916 smart_str_appends(str,
";\n");
1921 if (decl->
child[3]) {
1922 zend_ast_export_attributes(str, decl->
child[3], indent, 1);
1925 smart_str_appends(str,
"interface ");
1927 smart_str_appends(str,
"trait ");
1929 smart_str_appends(str,
"enum ");
1932 smart_str_appends(str,
"abstract ");
1935 smart_str_appends(str,
"final ");
1938 smart_str_appends(str,
"readonly ");
1940 smart_str_appends(str,
"class ");
1944 smart_str_appends(str,
": ");
1945 zend_ast_export_type(str, decl->
child[4], indent);
1947 zend_ast_export_class_no_header(str, decl, indent);
1948 smart_str_appendc(str,
'\n');
1956 zend_ast_export_list(str, (
zend_ast_list*)ast, 1, 20, indent);
1959 smart_str_appendc(str,
'[');
1960 zend_ast_export_list(str, (
zend_ast_list*)ast, 1, 20, indent);
1961 smart_str_appendc(str,
']');
1964 smart_str_appendc(str,
'"');
1965 zend_ast_export_encaps_list(str,
'"', (
zend_ast_list*)ast, indent);
1966 smart_str_appendc(str,
'"');
1970 zend_ast_export_stmt(str, ast, indent);
1978 zend_ast_export_list(str, (
zend_ast_list*)ast, 0, 0, indent);
1981 smart_str_appends(str,
" use(");
1983 smart_str_appendc(str,
')');
1989 if (ast->
child[2]) {
1990 zend_ast_export_attributes(str, ast->
child[2], indent, 1);
1996 smart_str_appends(str,
"static ");
1999 smart_str_appends(str,
"readonly ");
2003 zend_ast_export_type(str, type_ast, indent);
2004 smart_str_appendc(str,
' ');
2012 smart_str_appends(str,
"const ");
2015 if (ast->
child[1]) {
2016 zend_ast_export_attributes(str, ast->
child[1], indent, 1);
2020 smart_str_appends(str,
"const ");
2021 if (ast->
child[2]) {
2022 zend_ast_export_type(str, ast->
child[2], indent);
2023 smart_str_appendc(str,
' ');
2026 ast = ast->
child[0];
2033 smart_str_appends(str,
"use ");
2035 smart_str_appends(str,
"function ");
2037 smart_str_appends(str,
"const ");
2043 switch (ast->
attr) {
2068 smart_str_appendc(str,
'$');
2069 zend_ast_export_var(str, ast->
child[0], 0, indent);
2072 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2075 smart_str_appends(str,
"...");
2076 ast = ast->
child[0];
2081 switch (ast->
attr) {
2099 smart_str_appendc(str,
'`');
2105 zv = zend_ast_get_zval(ast->
child[0]);
2107 zend_ast_export_qstr(str,
'`',
Z_STR_P(
zv));
2109 smart_str_appendc(str,
'`');
2114 if (ast->
child[0]) {
2123 switch (ast->
attr) {
2133 switch (ast->
attr) {
2155 zend_ast_export_name(str, ast->
child[0], 0, indent);
2156 smart_str_appendc(str,
':');
2159 smart_str_appendc(str,
'&');
2160 ast = ast->
child[0];
2169 smart_str_appends(str,
"goto ");
2170 zend_ast_export_name(str, ast->
child[0], 0, indent);
2179 zend_ast_export_ex(str, ast->
child[0], 260, indent);
2180 smart_str_appendc(str,
'[');
2181 if (ast->
child[1]) {
2182 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2184 smart_str_appendc(str,
']');
2188 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2190 zend_ast_export_var(str, ast->
child[1], 0, indent);
2193 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2194 smart_str_appends(str,
"::$");
2195 zend_ast_export_var(str, ast->
child[1], 0, indent);
2198 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2199 smart_str_appendc(str,
'(');
2200 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2201 smart_str_appendc(str,
')');
2204 smart_str_append(str,
Z_STR_P(zend_ast_get_zval(ast->
child[0])));
2205 smart_str_appendc(str,
'(');
2206 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2207 smart_str_appendc(str,
')');
2210 smart_str_appends(str,
"...");
2213 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2214 smart_str_appends(str,
"::");
2215 zend_ast_export_name(str, ast->
child[1], 0, indent);
2220 switch (ast->
attr) {
2222 smart_str_appends(str,
"self");
2225 smart_str_appends(str,
"parent");
2230 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2232 smart_str_appends(str,
"::class");
2237 switch (ast->
attr) {
2255 switch (ast->
attr) {
2284 if (ast->
child[1]) {
2285 zend_ast_export_ex(str, ast->
child[1], 80, indent);
2286 smart_str_appends(str,
" => ");
2289 smart_str_appendc(str,
'&');
2290 zend_ast_export_ex(str, ast->
child[0], 80, indent);
2293 smart_str_appends(str,
"new ");
2296 if (decl->
child[3]) {
2297 zend_ast_export_attributes(str, decl->
child[3], indent, 0);
2299 smart_str_appends(str,
"class");
2300 if (!zend_ast_is_list(ast->
child[1])
2301 || zend_ast_get_list(ast->
child[1])->children) {
2302 smart_str_appendc(str,
'(');
2303 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2304 smart_str_appendc(str,
')');
2306 zend_ast_export_class_no_header(str, decl, indent);
2308 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2309 smart_str_appendc(str,
'(');
2310 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2311 smart_str_appendc(str,
')');
2315 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2316 smart_str_appends(str,
" instanceof ");
2317 zend_ast_export_ns_name(str, ast->
child[1], 0, indent);
2320 if (priority > 70) smart_str_appendc(str,
'(');
2321 smart_str_appends(str,
"yield ");
2322 if (ast->
child[0]) {
2323 if (ast->
child[1]) {
2324 zend_ast_export_ex(str, ast->
child[1], 70, indent);
2325 smart_str_appends(str,
" => ");
2327 zend_ast_export_ex(str, ast->
child[0], 70, indent);
2329 if (priority > 70) smart_str_appendc(str,
')');
2335 smart_str_appends(str,
"static $");
2336 zend_ast_export_name(str, ast->
child[0], 0, indent);
2339 smart_str_appends(str,
"while (");
2340 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2341 smart_str_appends(str,
") {\n");
2342 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
2343 zend_ast_export_indent(str, indent);
2344 smart_str_appendc(str,
'}');
2347 smart_str_appends(str,
"do {\n");
2348 zend_ast_export_stmt(str, ast->
child[0], indent + 1);
2349 zend_ast_export_indent(str, indent);
2350 smart_str_appends(str,
"} while (");
2351 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2352 smart_str_appendc(str,
')');
2356 if (ast->
child[0]) {
2357 smart_str_appends(str,
"if (");
2358 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2359 smart_str_appends(str,
") {\n");
2360 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
2362 smart_str_appends(str,
"else {\n");
2363 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
2365 zend_ast_export_indent(str, indent);
2366 smart_str_appendc(str,
'}');
2369 smart_str_appends(str,
"switch (");
2370 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2371 smart_str_appends(str,
") {\n");
2372 zend_ast_export_ex(str, ast->
child[1], 0, indent + 1);
2373 zend_ast_export_indent(str, indent);
2374 smart_str_appendc(str,
'}');
2377 zend_ast_export_indent(str, indent);
2378 if (ast->
child[0]) {
2379 smart_str_appends(str,
"case ");
2380 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2381 smart_str_appends(str,
":\n");
2383 smart_str_appends(str,
"default:\n");
2385 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
2388 smart_str_appends(str,
"match (");
2389 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2390 smart_str_appends(str,
") {\n");
2391 zend_ast_export_ex(str, ast->
child[1], 0, indent + 1);
2392 zend_ast_export_indent(str, indent);
2393 smart_str_appendc(str,
'}');
2396 zend_ast_export_indent(str, indent);
2397 if (ast->
child[0]) {
2399 smart_str_appends(str,
" => ");
2401 smart_str_appends(str,
"default => ");
2403 zend_ast_export_ex(str, ast->
child[1], 0, 0);
2404 smart_str_appends(str,
",\n");
2407 smart_str_appends(str,
"declare(");
2410 smart_str_appendc(str,
')');
2411 if (ast->
child[1]) {
2412 smart_str_appends(str,
" {\n");
2413 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
2414 zend_ast_export_indent(str, indent);
2415 smart_str_appendc(str,
'}');
2417 smart_str_appendc(str,
';');
2421 smart_str_appendc(str,
'$');
2422 zend_ast_export_name(str, ast->
child[0], 0, indent);
2425 if (default_value) {
2426 smart_str_appends(str,
" = ");
2427 zend_ast_export_ex(str, default_value, 0, indent + 1);
2430 if (ast->
child[3]) {
2431 zend_ast_export_hook_list(str, zend_ast_get_list(ast->
child[3]), indent);
2435 zend_ast_export_name(str, ast->
child[0], 0, indent);
2438 smart_str_appends(str,
"use ");
2439 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2440 if (ast->
child[1]) {
2441 smart_str_appends(str,
" {\n");
2442 zend_ast_export_ex(str, ast->
child[1], 0, indent + 1);
2443 zend_ast_export_indent(str, indent);
2444 smart_str_appends(str,
"}");
2446 smart_str_appends(str,
";");
2450 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2451 smart_str_appends(str,
" insteadof ");
2452 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2455 if (ast->
child[0]) {
2456 zend_ast_export_name(str, ast->
child[0], 0, indent);
2457 smart_str_appends(str,
"::");
2459 zend_ast_export_name(str, ast->
child[1], 0, indent);
2462 smart_str_appends(str,
"namespace");
2463 if (ast->
child[0]) {
2464 smart_str_appendc(str,
' ');
2465 zend_ast_export_name(str, ast->
child[0], 0, indent);
2467 if (ast->
child[1]) {
2468 smart_str_appends(str,
" {\n");
2469 zend_ast_export_stmt(str, ast->
child[1], indent + 1);
2470 zend_ast_export_indent(str, indent);
2471 smart_str_appends(str,
"}\n");
2473 smart_str_appendc(str,
';');
2478 zend_ast_export_name(str, ast->
child[0], 0, indent);
2480 smart_str_appends(str,
" as public");
2482 smart_str_appends(str,
" as protected");
2484 smart_str_appends(str,
" as private");
2485 }
else if (ast->
child[1]) {
2486 smart_str_appends(str,
" as");
2488 if (ast->
child[1]) {
2489 smart_str_appendc(str,
' ');
2490 zend_ast_export_name(str, ast->
child[1], 0, indent);
2494 smart_str_append(str, zend_ast_get_str(ast->
child[0]));
2495 smart_str_appends(str,
": ");
2496 ast = ast->
child[1];
2502 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2504 zend_ast_export_var(str, ast->
child[1], 0, indent);
2505 smart_str_appendc(str,
'(');
2506 zend_ast_export_ex(str, ast->
child[2], 0, indent);
2507 smart_str_appendc(str,
')');
2510 zend_ast_export_ns_name(str, ast->
child[0], 0, indent);
2511 smart_str_appends(str,
"::");
2512 zend_ast_export_var(str, ast->
child[1], 0, indent);
2513 smart_str_appendc(str,
'(');
2514 zend_ast_export_ex(str, ast->
child[2], 0, indent);
2515 smart_str_appendc(str,
')');
2518 if (priority > 100) smart_str_appendc(str,
'(');
2519 zend_ast_export_ex(str, ast->
child[0], 100, indent);
2520 if (ast->
child[1]) {
2521 smart_str_appends(str,
" ? ");
2522 zend_ast_export_ex(str, ast->
child[1], 101, indent);
2523 smart_str_appends(str,
" : ");
2525 smart_str_appends(str,
" ?: ");
2527 zend_ast_export_ex(str, ast->
child[2], 101, indent);
2528 if (priority > 100) smart_str_appendc(str,
')');
2532 smart_str_appends(str,
"try {\n");
2533 zend_ast_export_stmt(str, ast->
child[0], indent + 1);
2534 zend_ast_export_indent(str, indent);
2535 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2536 if (ast->
child[2]) {
2537 smart_str_appends(str,
"} finally {\n");
2538 zend_ast_export_stmt(str, ast->
child[2], indent + 1);
2539 zend_ast_export_indent(str, indent);
2541 smart_str_appendc(str,
'}');
2544 smart_str_appends(str,
"} catch (");
2546 if (ast->
child[1]) {
2547 smart_str_appends(str,
" $");
2548 zend_ast_export_var(str, ast->
child[1], 0, indent);
2550 smart_str_appends(str,
") {\n");
2551 zend_ast_export_stmt(str, ast->
child[2], indent + 1);
2552 zend_ast_export_indent(str, indent);
2555 if (ast->
child[3]) {
2556 zend_ast_export_attributes(str, ast->
child[3], indent, 0);
2559 if (ast->
child[0]) {
2560 zend_ast_export_type(str, ast->
child[0], indent);
2561 smart_str_appendc(str,
' ');
2564 smart_str_appendc(str,
'&');
2567 smart_str_appends(str,
"...");
2569 smart_str_appendc(str,
'$');
2570 zend_ast_export_name(str, ast->
child[1], 0, indent);
2571 if (ast->
child[2]) {
2572 smart_str_appends(str,
" = ");
2573 zend_ast_export_ex(str, ast->
child[2], 0, indent);
2575 if (ast->
child[5]) {
2576 zend_ast_export_hook_list(str, zend_ast_get_list(ast->
child[5]), indent);
2580 if (ast->
child[3]) {
2581 zend_ast_export_attributes(str, ast->
child[3], indent, 1);
2583 smart_str_appends(str,
"case ");
2584 zend_ast_export_name(str, ast->
child[0], 0, indent);
2585 if (ast->
child[1]) {
2586 smart_str_appends(str,
" = ");
2587 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2593 smart_str_appends(str,
"for (");
2594 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2595 smart_str_appendc(str,
';');
2596 if (ast->
child[1]) {
2597 smart_str_appendc(str,
' ');
2598 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2600 smart_str_appendc(str,
';');
2601 if (ast->
child[2]) {
2602 smart_str_appendc(str,
' ');
2603 zend_ast_export_ex(str, ast->
child[2], 0, indent);
2605 smart_str_appends(str,
") {\n");
2606 zend_ast_export_stmt(str, ast->
child[3], indent + 1);
2607 zend_ast_export_indent(str, indent);
2608 smart_str_appendc(str,
'}');
2611 smart_str_appends(str,
"foreach (");
2612 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2613 smart_str_appends(str,
" as ");
2614 if (ast->
child[2]) {
2615 zend_ast_export_ex(str, ast->
child[2], 0, indent);
2616 smart_str_appends(str,
" => ");
2618 zend_ast_export_ex(str, ast->
child[1], 0, indent);
2619 smart_str_appends(str,
") {\n");
2620 zend_ast_export_stmt(str, ast->
child[3], indent + 1);
2621 zend_ast_export_indent(str, indent);
2622 smart_str_appendc(str,
'}');
2629 if (priority >
p) smart_str_appendc(str,
'(');
2630 zend_ast_export_ex(str, ast->
child[0], pl, indent);
2631 smart_str_appends(str, op);
2632 zend_ast_export_ex(str, ast->
child[1], pr, indent);
2633 if (priority >
p) smart_str_appendc(str,
')');
2637 if (priority >
p) smart_str_appendc(str,
'(');
2638 smart_str_appends(str, op);
2639 zend_ast_export_ex(str, ast->
child[0], pl, indent);
2640 if (priority >
p) smart_str_appendc(str,
')');
2644 if (priority >
p) smart_str_appendc(str,
'(');
2645 zend_ast_export_ex(str, ast->
child[0], pl, indent);
2646 smart_str_appends(str, op);
2647 if (priority >
p) smart_str_appendc(str,
')');
2651 smart_str_appends(str, op);
2652 smart_str_appendc(str,
'(');
2653 zend_ast_export_ex(str, ast->
child[0], 0, indent);
2654 smart_str_appendc(str,
')');
2658 smart_str_appends(str, op);
2659 if (ast->
child[0]) {
2660 smart_str_appendc(str,
' ');
2661 ast = ast->
child[0];
2667 smart_str_appends(str, op);
2670append_default_value:
2672 smart_str_appends(str,
" = ");
2683 smart_str_appends(&str,
prefix);
2684 zend_ast_export_ex(&str, ast, 0, 0);
2685 smart_str_appends(&str, suffix);
2694 switch (ast->
kind) {
zend_ffi_ctype_name_buf buf
unsigned char key[REFLECTION_KEY_LEN]
zend_string * doc_comment
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format,...)
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
ZEND_API zval * zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv)
ZEND_API zend_result array_set_zval_key(HashTable *ht, zval *key, zval *value)
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API ZEND_COLD void zend_wrong_property_read(zval *object, zval *property)
ZEND_API void zend_call_known_function(zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, uint32_t param_count, zval *params, HashTable *named_params)
#define ZVAL_EMPTY_STRING(z)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_from_long(zend_long lval)
ZEND_API zend_ast * zend_ast_create_n(unsigned kind,...)
ZEND_API void ZEND_FASTCALL zend_ast_destroy(zend_ast *ast)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_2(zend_ast_kind kind, zend_ast *child1, zend_ast *child2)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_1(zend_ast_kind kind, zend_ast *child)
ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner(zval *result, zend_ast *ast, zend_class_entry *scope, bool *short_circuited_ptr, zend_ast_evaluate_ctx *ctx)
ZEND_API void zend_ast_apply(zend_ast *ast, zend_ast_apply_func fn, void *context)
ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_ex(zval *result, zend_ast *ast, zend_class_entry *scope, bool *short_circuited_ptr, zend_ast_evaluate_ctx *ctx)
ZEND_API zend_ast_ref *ZEND_FASTCALL zend_ast_copy(zend_ast *ast)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_znode(znode *node)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_list_add(zend_ast *ast, zend_ast *op)
#define POSTFIX_OP(_op, _p, _pl)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_3(zend_ast_kind kind, zend_ast *child1, zend_ast *child2, zend_ast *child3)
#define APPEND_NODE_1(_op)
#define zend_ast_export_catch_name_list(s, l, i)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_with_lineno(zval *zv, uint32_t lineno)
zend_ast *ZEND_FASTCALL zend_ast_with_attributes(zend_ast *ast, zend_ast *attr)
zend_ast * zend_ast_create_concat_op(zend_ast *op0, zend_ast *op1)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_1(zend_ast_kind kind, zend_ast *child)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_class_const_or_name(zend_ast *class_name, zend_ast *name)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_va(zend_ast_kind kind, zend_ast_attr attr, va_list *va)
#define BINARY_OP(_op, _p, _pl, _pr)
ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *scope)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_5(zend_ast_kind kind, zend_ast *child1, zend_ast *child2, zend_ast *child3, zend_ast *child4, zend_ast *child5)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_4(zend_ast_kind kind, zend_ast *child1, zend_ast *child2, zend_ast *child3, zend_ast *child4)
#define APPEND_DEFAULT_VALUE(n)
#define zend_ast_export_name_list(s, l, i)
ZEND_API ZEND_COLD zend_string * zend_ast_export(const char *prefix, zend_ast *ast, const char *suffix)
ZEND_API zend_ast * zend_ast_create_decl(zend_ast_kind kind, uint32_t flags, uint32_t start_lineno, zend_string *doc_comment, zend_string *name, zend_ast *child0, zend_ast *child1, zend_ast *child2, zend_ast *child3, zend_ast *child4)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_2(zend_ast_kind kind, zend_ast *child1, zend_ast *child2)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_0(zend_ast_kind kind)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_0(zend_ast_kind kind)
ZEND_API zend_ast * zend_ast_create_ex_n(zend_ast_kind kind, unsigned attr,...)
#define PREFIX_OP(_op, _p, _pl)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval(zval *zv)
ZEND_API void ZEND_FASTCALL zend_ast_ref_destroy(zend_ast_ref *ast)
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_constant(zend_string *name, zend_ast_attr attr)
ZEND_API zend_ast_process_t zend_ast_process
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_from_str(zend_string *str)
#define zend_ast_create(...)
#define zend_ast_create_ex(...)
struct _zend_ast_zval zend_ast_zval
#define ZEND_AST_NUM_CHILDREN_SHIFT
struct _zend_ast_list zend_ast_list
void(* zend_ast_process_t)(zend_ast *ast)
void(* zend_ast_apply_func)(zend_ast **ast_ptr, void *context)
#define zend_ast_create_list(init_children,...)
@ ZEND_AST_ASSIGN_COALESCE
@ ZEND_AST_CLASS_CONST_GROUP
@ ZEND_AST_ATTRIBUTE_LIST
@ ZEND_AST_TRAIT_ADAPTATIONS
@ ZEND_AST_TYPE_INTERSECTION
@ ZEND_AST_TRAIT_PRECEDENCE
@ ZEND_AST_PARENT_PROPERTY_HOOK_CALL
@ ZEND_AST_CALLABLE_CONVERT
@ ZEND_AST_INCLUDE_OR_EVAL
@ ZEND_AST_MATCH_ARM_LIST
@ ZEND_AST_CONST_ENUM_INIT
@ ZEND_AST_METHOD_REFERENCE
@ ZEND_AST_PROPERTY_HOOK_SHORT_BODY
@ ZEND_AST_NULLSAFE_METHOD_CALL
@ ZEND_AST_CONSTANT_CLASS
struct _zend_ast_decl zend_ast_decl
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, const zval *op2)
zend_result(ZEND_FASTCALL * binary_op_type)(zval *, zval *, zval *)
#define ZEND_PARAM_VARIADIC
#define ZEND_FETCH_CLASS_SELF
#define ZEND_NAME_RELATIVE
#define ZEND_ACC_ABSTRACT
#define ZEND_TYPE_NULLABLE
#define ZEND_ACC_READONLY
#define ZEND_ACC_PROTECTED_SET
ZEND_API binary_op_type get_binary_op(int opcode)
#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS
#define ZEND_ACC_INTERFACE
#define ZEND_ACC_PRIVATE_SET
struct _zend_ast_znode zend_ast_znode
#define ZEND_ACC_READONLY_CLASS
ZEND_API unary_op_type get_unary_op(int opcode)
#define ZEND_INCLUDE_ONCE
#define ZEND_FETCH_CLASS_EXCEPTION
#define ZEND_FETCH_CLASS_PARENT
#define ZEND_ACC_PUBLIC_SET
#define ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT
#define ZEND_REQUIRE_ONCE
@ ZEND_MODIFIER_TARGET_CONSTANT
@ ZEND_MODIFIER_TARGET_PROPERTY
@ ZEND_MODIFIER_TARGET_METHOD
@ ZEND_MODIFIER_TARGET_CPP
zend_result(ZEND_FASTCALL * unary_op_type)(zval *, zval *)
#define ZEND_ACC_RETURN_REFERENCE
#define ZEND_ACC_PROTECTED
ZEND_API zval * zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, uint32_t flags)
ZEND_API zval * zend_get_class_constant_ex(zend_string *class_name, zend_string *constant_name, zend_class_entry *scope, uint32_t flags)
zend_object * zend_enum_new(zval *result, zend_class_entry *ce, zend_string *case_name, zval *backing_value_zv)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_invalid_class_constant_type_error(uint8_t type)
ZEND_API void zend_fetch_dimension_const(zval *result, zval *container, zval *dim, int type)
ZEND_API zend_class_entry * zend_lookup_class(zend_string *name)
ZEND_API zend_class_entry * zend_fetch_class_with_scope(zend_string *class_name, uint32_t fetch_type, zend_class_entry *scope)
union _zend_function zend_function
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData)
ZEND_API void ZEND_FASTCALL zend_array_destroy(HashTable *ht)
ZEND_API zval *ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key, zval *pData)
ZEND_API zval *ZEND_FASTCALL zend_hash_add(HashTable *ht, zend_string *key, zval *pData)
#define zend_new_array(size)
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val)
#define ZEND_HASH_FOREACH_STR_KEY_VAL(ht, _key, _val)
#define ZEND_HASH_FOREACH_END()
#define ZVAL_EMPTY_ARRAY(z)
struct _zend_string zend_string
ZEND_API zend_result ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2)
ZEND_API bool ZEND_FASTCALL zend_is_true(const zval *op)
ZEND_API zend_result ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_result ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)
#define ALLOCA_FLAG(name)
#define EXPECTED(condition)
#define do_alloca(p, use_heap)
#define zend_always_inline
#define ZEND_UNREACHABLE()
#define free_alloca(p, use_heap)
#define EMPTY_SWITCH_DEFAULT_CASE()
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
ZEND_API void ZEND_FASTCALL smart_str_append_double(smart_str *str, double num, int precision, bool zero_fraction)
#define zend_string_equals_ci(s1, s2)
struct _zend_ast_ref zend_ast_ref
#define Z_TRY_ADDREF_P(pz)
#define GC_SET_REFCOUNT(p, rc)
#define Z_STRVAL_P(zval_p)
#define Z_ARRVAL_P(zval_p)
#define ZVAL_STR_COPY(z, s)
struct _zend_array HashTable
#define ZVAL_COPY_OR_DUP(z, v)
#define Z_OBJ_HT_P(zval_p)
#define Z_STRLEN_P(zval_p)
#define Z_OBJCE_P(zval_p)
ZEND_RESULT_CODE zend_result
struct _zend_ast zend_ast
#define Z_ASTVAL_P(zval_p)
#define ZVAL_COPY_VALUE(z, v)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
#define ZEND_IS_IDENTICAL
#define ZEND_IS_NOT_EQUAL
#define ZEND_IS_NOT_IDENTICAL
#define ZEND_IS_SMALLER_OR_EQUAL