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

Revision 19792, 498 bytes checked in by Seasoft, 13 years ago (diff)

#744(PHP4 互換用途ソースを将来的に切り捨てやすい仕組みづくり)

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.