3v4l.org

run code in 300+ PHP versions simultaneously
<?php $multidim_array = ['a' => [' \one ', ['b' => 'two\\', [['c' => 'thr\ee']]]]]; var_export($multidim_array); echo "\n"; $func = 'stripslashes'; if (function_exists($func)) { array_walk_recursive($multidim_array, function(&$v)use($func){$v = $func($v);}); var_export($multidim_array); } else { echo "not callable"; }

preferences:
31.29 ms | 406 KiB | 5 Q