diff options
author | Xinchen Hui <laruence@php.net> | 2015-02-27 11:42:57 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-02-27 11:42:57 +0800 |
commit | cfaf7c3b5f105508cb734c834063c128b514cc7d (patch) | |
tree | 7493c197a6f5776ec5cd10cd4591fba34dadd546 | |
parent | 2d1a3ecd278ace48a941201858ce194747c9cb4f (diff) | |
parent | 3e82816ba1a82843a352ce4050b2010fd9932dee (diff) | |
download | php-git-cfaf7c3b5f105508cb734c834063c128b514cc7d.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
-rw-r--r-- | ext/opcache/Optimizer/zend_optimizer.c | 1 | ||||
-rw-r--r-- | ext/opcache/tests/bug69125.phpt | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 08ce46c356..c48d5a6732 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -269,6 +269,7 @@ static void update_op2_const(zend_op_array *op_array, case ZEND_ISSET_ISEMPTY_DIM_OBJ: case ZEND_ADD_ARRAY_ELEMENT: case ZEND_INIT_ARRAY: + case ZEND_ASSIGN_DIM: case ZEND_UNSET_DIM: case ZEND_FETCH_DIM_R: case ZEND_FETCH_DIM_W: diff --git a/ext/opcache/tests/bug69125.phpt b/ext/opcache/tests/bug69125.phpt new file mode 100644 index 0000000000..913be01b00 --- /dev/null +++ b/ext/opcache/tests/bug69125.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #69125 (Array numeric string as key) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +const SZERO = '0'; +const SONE = '1'; + +$array[SZERO] = "okey"; +$array[1] = "okey"; + +var_dump($array[SZERO]); +var_dump($array[SONE]); +?> +--EXPECT-- +string(4) "okey" +string(4) "okey" |