3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sub = array( '+7 812-703-10-00', '8-812-346-60-01', '+7(495)785-98-42', '(499) 725 77 88', '8 (495) 663-61-00', '(812) 448-54-18', '8916-318-36-36', '540-69-05','','','','','','','','','','','','' ); preg_match('/^(\+?\d+)?\s*(\(\d+\))?[\s-]*([\d-]*)$/', $sub, $res); var_dump($res);
Output for 4.3.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: preg_match() expects parameter 2 to be string, array given in /in/E5TWT on line 13 NULL
Output for 4.3.0 - 4.3.2
Notice: Array to string conversion in /in/E5TWT on line 13 array(0) { }