3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<EOD PRD Hervey Bay 07 2525 1919 RG Sprake &amp; Co Maryborough 4141 2424 Owner Robert - 0429 966 391 Owner Maureen - 07 8888 4444 - 0422000 111 Owner Wayne - 0430 555 666 Builder Scott - 0444 555 777 EOD; preg_match_all('/^(Owner |Builder )?(.*?)(?=-| \d)[- ]+(.*)$/m', $text, $matches); array_walk($matches[3], function (&$v) { $v = preg_replace('/[^\d]/', '', $v); }); print_r($matches);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => PRD Hervey Bay 07 2525 1919 [1] => RG Sprake &amp; Co Maryborough 4141 2424 [2] => Owner Robert - 0429 966 391 [3] => Owner Maureen - 07 8888 4444 - 0422000 111 [4] => Owner Wayne - 0430 555 666 [5] => Builder Scott - 0444 555 777 ) [1] => Array ( [0] => [1] => [2] => Owner [3] => Owner [4] => Owner [5] => Builder ) [2] => Array ( [0] => PRD Hervey Bay [1] => RG Sprake &amp; Co Maryborough [2] => Robert [3] => Maureen [4] => Wayne [5] => Scott ) [3] => Array ( [0] => 0725251919 [1] => 41412424 [2] => 0429966391 [3] => 07888844440422000111 [4] => 0430555666 [5] => 0444555777 ) )

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:
68.13 ms | 403 KiB | 8 Q