3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match( '/(?<=\bLevel\s)(?:[\w-]+)/is', $str, $matches); return $matches; } $one = 'aasdjhgasd asgdahjsd hjg 4ht ahsjdhkajsdhakjsdh Level 1, 100 XP Unlocked 3 Jul'; $string = "This is a string, keyword next, some more text. keyword next-word. keyword another_word. Okay, keyword do-rae-mi-fa_so_la."; print_r(get_numerics($one)); print_r(get_numerics($string));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 1 ) Array ( )

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:
57.25 ms | 401 KiB | 8 Q