3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function sanitise ($data) { $data = array_map("trim", $data); $data = array_map("htmlspecialchars", $data); return $data; } print_r(sanitise($data));
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: data in /in/4Lhm2 on line 8 Warning: array_map(): Argument #2 should be an array in /in/4Lhm2 on line 3 Warning: array_map(): Argument #2 should be an array in /in/4Lhm2 on line 4
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: data in /in/4Lhm2 on line 8 Warning: array_map(): Argument #2 should be an array in /in/4Lhm2 on line 3 Warning: array_map(): Argument #2 should be an array in /in/4Lhm2 on line 4
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: data in /in/4Lhm2 on line 8 Warning: array_map() [http://www.php.net/function.array-map]: Argument #2 should be an array in /in/4Lhm2 on line 3 Warning: array_map() [http://www.php.net/function.array-map]: Argument #2 should be an array in /in/4Lhm2 on line 4