3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /in/E5TWT:13 Stack trace: #0 /in/E5TWT(13): preg_match('/^(\\+?\\d+)?\\s*(...', Array, NULL) #1 {main} thrown in /in/E5TWT on line 13
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.71 ms | 401 KiB | 8 Q