9e127b9831
Most of this is ported over, except some omissions:
- array_filter, array_key_exists (suspected we had coverage already;
one is a bytecode, and one was rewritten in hhas recently)
- some random cases distinguishing init_null_variant vs. null_variant
19 linhas
390 B
PHP
19 linhas
390 B
PHP
<?php
|
|
|
|
function test_print($item,$key) {
|
|
echo "$key: $item\n";
|
|
}
|
|
|
|
function test_alter(&$item,$key,$prefix) {
|
|
$item = $prefix.': '.$item;
|
|
}
|
|
|
|
$fruits = array("d" => "lemon",
|
|
"a" => "orange",
|
|
"b" => "banana",
|
|
"c" => "apple");
|
|
|
|
array_walk($fruits, "test_print");
|
|
array_walk($fruits, "test_alter", "fruit");
|
|
array_walk($fruits, "test_print");
|