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/", $credentials);
based on al0U5
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: credentials in /in/93eel on line 15 Warning: preg_grep() expects parameter 2 to be array, null given in /in/93eel on line 15
Output for 5.0.4 - 5.1.6
Notice: Undefined variable: credentials in /in/93eel on line 15 Warning: preg_grep(): Second argument to preg_grep() should be an array in /in/93eel on line 15
Output for 4.3.11 - 5.0.3
Notice: Undefined variable: credentials in /in/93eel on line 15 Warning: preg_grep(): Second argument to preg_grep() should be an array in /in/93eel on line 15
Output for 4.3.0 - 4.3.10
Notice: Undefined variable: credentials in /in/93eel on line 15 Warning: Second argument to preg_grep() should be an array in /in/93eel on line 15