3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/(?i)^((?:[a-z]+(?:\h+[a-z]+)*)?)\h*(\d+(?:\h+\d+)*)\h*((?:[a-z]+(?:\h+[a-z]+)*)?)?$/mi'; $str = 'from 8 000 packs test from 8 000 packs test 432534534 from 344454 packs 45054 packs 04 555 434654 54 564 packs'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); foreach($matches as $match) { list(,$before, $num, $after) = $match; echo sprintf( "before: %s\nnum:%s\nafter:%s\n--------------------\n", $before, preg_replace("/\h+/", "", $num), $after ); }
Output for git.master, git.master_jit, rfc.property-hooks
before: from num:8000 after:packs -------------------- before: test from num:8000 after:packs test -------------------- before: num:432534534 after: -------------------- before: from num:344454 after:packs -------------------- before: num:45054 after:packs -------------------- before: num:04555 after: -------------------- before: num:434654 after: -------------------- before: num:54564 after:packs --------------------

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:
50 ms | 1336 KiB | 4 Q