File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
bug37715.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Bug #37715 (array pointers resetting on copy)
3: --FILE--
4: <?php
5: $a = array(
6: 'a' => array(
7: 'A', 'B', 'C', 'D',
8: ),
9: 'b' => array(
10: 'AA', 'BB', 'CC', 'DD',
11: ),
12: );
13:
14: // Set the pointer of $a to 'b' and the pointer of 'b' to 'CC'
15: reset($a);
16: next($a);
17: next($a['b']);
18: next($a['b']);
19: next($a['b']);
20:
21: var_dump(key($a['b']));
22: foreach($a as $k => $d)
23: {
24: }
25: // Alternatively $c = $a; and foreachloop removal will cause identical results.
26: var_dump(key($a['b']));
27: --EXPECT--
28: int(3)
29: int(3)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>