3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string_to_parse ="ADDING MEMBER ID 199867 TO THE 25 MATRIX... Checking For Next Paid Sponsor in Level 25 SPONSOR ID FOUND IS 199849 Sponsor ID found to be: 199849 Checking Row 1 Checking Row 2 COULD NOT FIND AN OPEN SPOT IN THE MATRIX OF SPONSOR ID: 2377893"; function FindSponserId($string_to_parse) { if (preg_match("/COULD NOT FIND AN OPEN SPOT IN THE MATRIX OF SPONSOR ID:/", $string_to_parse, $matches)) { $array_index = explode("COULD NOT FIND AN OPEN SPOT IN THE MATRIX OF SPONSOR ID:",$string_to_parse); $sponsor_id = $array_index[1]; print_r("Sponsor Id :: ".$sponsor_id); } } FindSponserId($string_to_parse); ?>
Output for 4.3.0 - 7.1.0
Sponsor Id :: 2377893