source: branches/version-2_5-dev/data/module/Compat/tests/function/array_walk_recursive.phpt @ 20119

Revision 20119, 498 bytes checked in by nanasess, 13 years ago (diff)

module 以下は svn:keywords を除外

  • Property svn:eol-style set to LF
Line 
1--TEST--
2Function -- array_walk_recursive
3--SKIPIF--
4<?php if (function_exists('array_walk_recursive')) { echo 'skip'; } ?>
5--FILE--
6<?php
7require_once 'PHP/Compat.php';
8PHP_Compat::loadFunction('array_walk_recursive');
9
10$sweet = array('a' => 'apple', 'b' => 'banana');
11$fruits = array('sweet' => $sweet, 'sour' => 'lemon');
12
13function test_print($item, $key)
14{
15   echo "$key holds $item\n";
16}
17
18array_walk_recursive($fruits, 'test_print');
19?>
20--EXPECT--
21a holds apple
22b holds banana
23sour holds lemon
Note: See TracBrowser for help on using the repository browser.