3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array( 'news', 'news?test=1', 'news/list?test=1', ); $res = array(); preg_match('/(\w)+[\?\/]?/', $arr, $res); print_r($res);
Output for 4.3.3 - 7.1.0
Warning: preg_match() expects parameter 2 to be string, array given in /in/icPr7 on line 10 Array ( )
Output for 4.3.0 - 4.3.2
Notice: Array to string conversion in /in/icPr7 on line 10 Array ( [0] => Array [1] => y )