3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'foo, bar,leo , light,, seo'; $a = explode(',', $str); $a = array_filter(array_map('trim', $recipients)); var_dump($a);
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: recipients in /in/WMIv4 on line 4 Warning: array_map(): Argument #2 should be an array in /in/WMIv4 on line 4 Warning: array_filter() expects parameter 1 to be array, null given in /in/WMIv4 on line 4 NULL
Output for hhvm-3.10.0 - 3.13.2
Notice: Undefined variable: recipients in /in/WMIv4 on line 4 Warning: array_map(): Argument #2 should be an array or collection Warning: array_filter() expects parameter 1 to be an array or collection in /in/WMIv4 on line 4 NULL
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: recipients in /in/WMIv4 on line 4 Warning: array_map(): Argument #2 should be an array in /in/WMIv4 on line 4 Warning: array_filter(): The first argument should be an array in /in/WMIv4 on line 4 NULL
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: recipients in /in/WMIv4 on line 4 Warning: array_map(): Argument #2 should be an array in /in/WMIv4 on line 4 Warning: array_filter(): The first argument should be an array in /in/WMIv4 on line 4 NULL
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: recipients in /in/WMIv4 on line 4 Warning: array_map() [http://www.php.net/function.array-map]: Argument #2 should be an array in /in/WMIv4 on line 4 Warning: array_filter() [http://www.php.net/function.array-filter]: The first argument should be an array in /in/WMIv4 on line 4 NULL