3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Есть два приемлих варианта +7911111111 и 8911111111. Просто иногда приходит что-то типа такого 8-911-111-11-11 что не есть гуд'; if (preg_match_all('~(?<!\d|\d-)(?:\+7|8)(?:-?\d){9,10}(?!-?\d)~', $text, $matches)) { $results = str_replace('-', '', $matches[0]); print_r($results); }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => +7911111111 [1] => 8911111111 [2] => 89111111111 )

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:
37.06 ms | 405 KiB | 5 Q