PHP userland backwards compatibility layer that emulates PHP 5.5+ core functions.

⌈⌋ ⎇ branch:  upgrade.php


Artifact [13bc7f8f32]

Artifact 13bc7f8f32cb05cf7016ca674cca08ab856aa90a:

  • File doc/tests1all/array_walk_recursive.phpt — part of check-in [51e3884900] at 2010-06-22 17:03:27 on branch trunk — upgradephp-15 (user: mario size: 602)

--TEST--
array_walk_recursive
--FILE--
<?php

$a = array(
  "x1",
  "x2\\",
  array(
     "x3aaa1",
     "x3a\\a2",
  ),
  "x4\+end",
);

echo "__start:\n";
array_walk_recursive($a, "outp");

function outp(&$a) {
   var_dump($a);
   $a = stripslashes($a);
}

echo "\n__result:\n";
var_dump($a);

?>
--EXPECT--
__start:
string(2) "x1"
string(3) "x2\"
string(6) "x3aaa1"
string(6) "x3a\a2"
string(7) "x4\+end"

__result:
array(4) {
  [0]=>
  string(2) "x1"
  [1]=>
  string(2) "x2"
  [2]=>
  &array(2) {
    [0]=>
    string(6) "x3aaa1"
    [1]=>
    string(5) "x3aa2"
  }
  [3]=>
  string(6) "x4+end"
}