3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array_filter = function($var) use ($keyword) { return preg_match("/\b$keyword\b/i", $var); }; $matches[$cat['name']] = array_push(array_filter($types, $array_filter));
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: keyword in /in/Wi9Lk on line 3 Notice: Undefined variable: cat in /in/Wi9Lk on line 4 Notice: Undefined variable: types in /in/Wi9Lk on line 4 Warning: array_filter() expects parameter 1 to be array, null given in /in/Wi9Lk on line 4 Notice: Only variables should be passed by reference in /in/Wi9Lk on line 4 Warning: array_push() expects at least 2 parameters, 1 given in /in/Wi9Lk on line 4
Output for 5.3.19 - 5.6.28
Notice: Undefined variable: keyword in /in/Wi9Lk on line 3 Notice: Undefined variable: cat in /in/Wi9Lk on line 4 Notice: Undefined variable: types in /in/Wi9Lk on line 4 Warning: array_filter() expects parameter 1 to be array, null given in /in/Wi9Lk on line 4 Strict Standards: Only variables should be passed by reference in /in/Wi9Lk on line 4 Warning: array_push() expects at least 2 parameters, 1 given in /in/Wi9Lk on line 4