3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t = "u: alpha p: p_alpha u: beta p: p_beta u: gamma p: p_gamma u: delta p: p_delta "; echo preg_grep("/^u: *alpha\np: *(.*?)\n/", $t);
based on 93eel
Output for 5.2.0 - 7.1.0
Warning: preg_grep() expects parameter 2 to be array, string given in /in/CuFVo on line 15
Output for 4.3.11 - 5.1.6
Warning: preg_grep(): Second argument to preg_grep() should be an array in /in/CuFVo on line 15
Output for 4.3.0 - 4.3.10
Warning: Second argument to preg_grep() should be an array in /in/CuFVo on line 15