3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $temp_terms = $params_arr["pm_other_terms"]; $temp_terms = "jd, jack, jack, jb, jd"; $temp_terms_arr = explode(",", $temp_terms); pr($temp_terms_arr); array_walk($temp_terms_arr, "trimspace"); echo 123; pr($temp_terms_arr); $u_arr = array_unique($temp_terms_arr); pr($u_arr); $f_arr = array_filter($u_arr); pr($f_arr); $pm_other_terms = implode(", ", $f_arr); echo $pm_other_terms; function trimspace(&$var){ $var = trim($var); }
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: params_arr in /in/stnNd on line 3 Fatal error: Uncaught Error: Call to undefined function pr() in /in/stnNd:6 Stack trace: #0 {main} thrown in /in/stnNd on line 6
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Notice: Undefined variable: params_arr in /in/stnNd on line 3 Fatal error: Call to undefined function pr() in /in/stnNd on line 6
Process exited with code 255.