3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function b($att, $val) { if(is_array($val)) { return array_map(array($this, 'b'), $val, array($att)); } return $val . ' filtered'; } } $a = new A; var_dump($a->b('att', array(1, 2, 3)));
Output for 4.3.0 - 7.1.0
array(3) { [0]=> string(12) "att filtered" [1]=> string(9) " filtered" [2]=> string(9) " filtered" }