source: src/router/php7/Zend/tests/bug73753.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 492 bytes
Line 
1--TEST--
2Bug #73753 Non packed arrays and duplication
3--FILE--
4<?php
5function iterate($current, $a, $result = null) {
6    if (!$current) {
7        return $result;
8    }
9
10    return iterate(getNext($a), $a, $current);
11}
12
13function getNext(&$a) {
14    return next($a);
15}
16
17function getCurrent($a) {
18    return current($a);
19}
20
21function traverse($a) {
22    return iterate(getCurrent($a), $a);
23}
24
25$arr = array(1 => 'foo', 'b' => 'bar', 'baz');
26var_dump(traverse($arr));
27?>
28--EXPECTF--
29string(3) "baz"
Note: See TracBrowser for help on using the repository browser.