zend_ast *new = emalloc(sizeof(zend_ast) + sizeof(zend_ast*) * (ast->children - 1));
int i;
new->kind = ast->kind;
+ new->children = ast->children;
for (i = 0; i < ast->children; i++) {
(&new->u.child)[i] = zend_ast_copy((&ast->u.child)[i]);
}
+ return new;
}
return zend_ast_create_dynamic(ast->kind);
}
Error case: class constant as an array
--FILE--
<?php
- class myclass
- {
- const myConst = array();
- }
+class myclass
+{
+ const myConst = array();
+}
?>
+===DONE===
--EXPECTF--
-
-Fatal error: Arrays are not allowed in class constants in %s on line 4
+===DONE===