summaryrefslogtreecommitdiff
path: root/Zend/zend_ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_ast.c')
-rw-r--r--Zend/zend_ast.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index 8a3df98c10..fa32232516 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -322,6 +322,18 @@ ZEND_API void zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *s
}
}
break;
+ case ZEND_FETCH_DIM_R:
+ zend_ast_evaluate(&op1, (&ast->u.child)[0], scope TSRMLS_CC);
+ zend_ast_evaluate(&op2, (&ast->u.child)[1], scope TSRMLS_CC);
+ {
+ zval *tmp;
+ zend_fetch_dimension_by_zval(&tmp, &op1, &op2 TSRMLS_CC);
+ *result = *tmp;
+ efree(tmp);
+ }
+ zval_dtor(&op1);
+ zval_dtor(&op2);
+ break;
default:
zend_error(E_ERROR, "Unsupported constant expression");
}