diff options
Diffstat (limited to 'ext/opcache')
| -rw-r--r-- | ext/opcache/Optimizer/compact_literals.c | 2 | ||||
| -rw-r--r-- | ext/opcache/Optimizer/zend_dump.c | 7 | ||||
| -rw-r--r-- | ext/opcache/tests/bug66251.phpt | 7 | ||||
| -rw-r--r-- | ext/opcache/tests/bug71843.phpt | 9 |
4 files changed, 11 insertions, 14 deletions
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c index 8cc83d2964..8c5702a38d 100644 --- a/ext/opcache/Optimizer/compact_literals.c +++ b/ext/opcache/Optimizer/compact_literals.c @@ -171,7 +171,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx LITERAL_INFO(opline->op1.constant, LITERAL_CONST, 1); break; case ZEND_FETCH_CONSTANT: - if ((opline->op1.num & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) { + if (opline->op1.num & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) { LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 3); } else { LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 2); diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c index ad4d393bd6..b10cc31c9d 100644 --- a/ext/opcache/Optimizer/zend_dump.c +++ b/ext/opcache/Optimizer/zend_dump.c @@ -127,11 +127,8 @@ static void zend_dump_unused_op(const zend_op *opline, znode_op op, uint32_t fla } else if (ZEND_VM_OP_CONSTRUCTOR == (flags & ZEND_VM_OP_MASK)) { fprintf(stderr, " CONSTRUCTOR"); } else if (ZEND_VM_OP_CONST_FETCH == (flags & ZEND_VM_EXT_MASK)) { - if (op.num & IS_CONSTANT_UNQUALIFIED) { - fprintf(stderr, " (unqualified)"); - } - if (op.num & IS_CONSTANT_IN_NAMESPACE) { - fprintf(stderr, " (in-namespace)"); + if (op.num & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) { + fprintf(stderr, " (unqualified-in-namespace)"); } } } diff --git a/ext/opcache/tests/bug66251.phpt b/ext/opcache/tests/bug66251.phpt index 64e758065b..42c6e2f606 100644 --- a/ext/opcache/tests/bug66251.phpt +++ b/ext/opcache/tests/bug66251.phpt @@ -13,5 +13,8 @@ const A="hello"; function getA() {return A;} ?> --EXPECTF-- -Warning: Use of undefined constant A - assumed 'A' (this will throw an Error in a future version of PHP) in %sbug66251.php on line 4 -A=A +Fatal error: Uncaught Error: Undefined constant 'A' in %s:%d +Stack trace: +#0 %s(%d): getA() +#1 {main} + thrown in %s on line %d diff --git a/ext/opcache/tests/bug71843.phpt b/ext/opcache/tests/bug71843.phpt index 924fb873fe..0a193425dd 100644 --- a/ext/opcache/tests/bug71843.phpt +++ b/ext/opcache/tests/bug71843.phpt @@ -8,18 +8,15 @@ opcache.optimization_level=0xFFFFBFFF <?php if (!extension_loaded('Zend OPcache')) die("skip"); ?> --FILE-- <?php +define('E', 'E'); +define('R', 'R'); +define('See', 'See'); 0 & ~E & ~R; 6 && ~See ?> okey --EXPECTF-- -Warning: Use of undefined constant E - assumed 'E' (this will throw an Error in a future version of PHP) in %sbug71843.php on line %d - Warning: A non-numeric value encountered in %s on line %d -Warning: Use of undefined constant R - assumed 'R' (this will throw an Error in a future version of PHP) in %sbug71843.php on line %d - Warning: A non-numeric value encountered in %s on line %d - -Warning: Use of undefined constant See - assumed 'See' (this will throw an Error in a future version of PHP) in %sbug71843.php on line %d okey |
