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' ); foreach($sub as $s){ preg_match('/^(\+?\d+)?\s*(\(\d+\))?[\s-]*([\d-]*)$/', $s, $res); print_r($res); }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => +7 812-703-10-00 [1] => +7 [2] => [3] => 812-703-10-00 ) Array ( [0] => 8-812-346-60-01 [1] => 8 [2] => [3] => 812-346-60-01 ) Array ( [0] => +7(495)785-98-42 [1] => +7 [2] => (495) [3] => 785-98-42 ) Array ( ) Array ( [0] => 8 (495) 663-61-00 [1] => 8 [2] => (495) [3] => 663-61-00 ) Array ( [0] => (812) 448-54-18 [1] => [2] => (812) [3] => 448-54-18 ) Array ( [0] => 8916-318-36-36 [1] => 8916 [2] => [3] => 318-36-36 ) Array ( [0] => 540-69-05 [1] => 540 [2] => [3] => 69-05 )

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:
43.14 ms | 402 KiB | 8 Q