3v4l.org

run code in 300+ PHP versions simultaneously
<?php $map = [ 'BACK PACK BBP160800103 G086-1 8#.JPG', 'BACKPACK BBP160500010 G114-3#1.JPG', 'WSL160800024-WSL160800025 L83-5.JPG', 'bogey', 'IA041017 L83-5.JPG' ]; $result = []; foreach ($map as $string) { array_push($result, ...preg_match_all('/\b(?:BBP|WSL|IA)\d{6,9}\b/', $string, $m) ? $m[0] : []); } var_export($result);
Output for git.master_jit, git.master, rfc.property-hooks
array ( 0 => 'BBP160800103', 1 => 'BBP160500010', 2 => 'WSL160800024', 3 => 'WSL160800025', 4 => 'IA041017', )

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