3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = array(1,1,1,1); var_dump(array_map('(string)', $var)); var_dump($var);
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: array_map() expects parameter 1 to be a valid callback, function '(string)' not found or invalid function name in /in/GNP6B on line 3 NULL array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(1) }
Output for hhvm-3.10.0 - 3.13.2
Warning: array_map() expects parameter 1 to be a valid callback in /in/GNP6B on line 3 NULL array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(1) }
Output for 4.3.2 - 5.2.17
Warning: array_map(): The first argument, '(string)', should be either NULL or a valid callback in /in/GNP6B on line 3 NULL array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(1) }
Output for 4.3.0 - 4.3.1
Warning: array_map() [http://www.php.net/function.array-map]: The first argument, '(string)', should be either NULL or a valid callback in /in/GNP6B on line 3 NULL array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(1) }