summaryrefslogtreecommitdiff
path: root/sapi/phpdbg
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-10-10 10:11:05 +0300
committerDmitry Stogov <dmitry@zend.com>2017-10-10 10:11:05 +0300
commitef5ea48741a1d227a10a6654c1a8cc2f02dd414f (patch)
treeb00f4e9dd2ea42355c860a0ea57a0d9f4b926091 /sapi/phpdbg
parent08c0998b1ff1fa1a105eda1540a90ddb8ee4b16a (diff)
downloadphp-git-ef5ea48741a1d227a10a6654c1a8cc2f02dd414f.tar.gz
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
Diffstat (limited to 'sapi/phpdbg')
-rw-r--r--sapi/phpdbg/phpdbg_utils.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c
index bdcb173c24..fa27fa96a8 100644
--- a/sapi/phpdbg/phpdbg_utils.c
+++ b/sapi/phpdbg/phpdbg_utils.c
@@ -844,12 +844,17 @@ char *phpdbg_short_zval_print(zval *zv, int maxlen) /* {{{ */
ZSTR_VAL(str), ZSTR_LEN(str) <= maxlen ? 0 : '+');
break;
}
- case IS_CONSTANT:
- decode = estrdup("<constant>");
- break;
- case IS_CONSTANT_AST:
- decode = estrdup("<ast>");
+ case IS_CONSTANT_AST: {
+ zend_ast *ast = Z_ASTVAL_P(zv);
+
+ if (ast->kind == ZEND_AST_CONSTANT
+ || ast->kind == ZEND_AST_CONSTANT_CLASS) {
+ decode = estrdup("<constant>");
+ } else {
+ decode = estrdup("<ast>");
+ }
break;
+ }
default:
spprintf(&decode, 0, "unknown type: %d", Z_TYPE_P(zv));
break;