3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = ' 39 9 30 30 30 31 34 30 30 32 33 32 36 30 31 38 0D 0A 00014002326018.. 39 30 30 30 31 34 30 30 32 33 32 36 30 35 34 0D 900014002326054. 0A . 39 30 30 30 31 34 30 30 32 33 32 36 30 39 31 0D 900014002326091. 0A . 39 30 30 30 31 34 30 30 32 33 32 36 31 36 33 0D 900014002326163. 0A . 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 32 30 30 0D 0A 26200.. 39 9 30 30 30 31 34 30 30 32 33 32 36 32 30 30 0D 0A 00014002326200.. 39 30 30 30 31 34 30 30 32 33 32 36 31 32 32 0D 900014002326122. 0A . 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 31 35 34 0D 0A 26154.. 39 30 30 30 31 34 30 30 32 33 9000140023 32 36 31 33 31 0D 0A 26131.. 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 31 30 34 0D 0A 26104.. 39 30 30 30 31 34 30 30 32 33 32 36 30 39 30 0D 900014002326090. 0A . 39 30 30 30 31 34 30 30 32 33 32 36 31 39 37 0D 900014002326197. 0A . 39 9 30 30 30 31 34 30 30 32 33 32 36 32 30 38 0D 0A 00014002326208.. 39 30 30 30 31 34 30 30 32 33 9000140023 32 36 31 31 35 0D 0A 26115.. 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 31 36 34 0D 0A 26164.. 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 30 31 36 0D 0A 39 30 30 30 31 34 30 30 32 26016..900014002 33 3 32 36 32 34 36 0D 0A 26246.. 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 32 34 36 0D 0A 26246.. 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 30 37 39 0D 0A 26079.. 39 9 30 30 30 31 34 30 30 32 33 000140023 32 36 31 32 30 0D 0A 26120.. 39 9 30 30 30 31 34 30 30 32 33 32 36 32 32 38 0D 0A 00014002326228.. 39 30 30 30 31 34 30 30 32 33 9000140023 32 36 31 38 36 0D 0A 26186..'; $pattern = '/(?:^.{48}|\.)([0-9]+\.?)/m'; preg_match_all($pattern, $data, $tags); //join all the bits belonging to the number $data=implode("", $tags[1]); //count the dots to have a correct count of the numbers grabbed //since each number was grabbed with an ending dot initially $count=substr_count($data, "."); //replace the dots with a html <br> tag (avoiding a split and a foreach loop) $tags=str_replace('.', "<br>\n", $data); print $tags . "<br>\n" . $count . " total scanned"; ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
900014002326018<br> 900014002326054<br> 900014002326091<br> 900014002326163<br> 900014002326200<br> 900014002326200<br> 900014002326122<br> 900014002326154<br> 900014002326131<br> 900014002326104<br> 900014002326090<br> 900014002326197<br> 900014002326208<br> 900014002326115<br> 900014002326164<br> 900014002326016<br> 900014002326246<br> 900014002326246<br> 900014002326079<br> 900014002326120<br> 900014002326228<br> 900014002326186<br> <br> 22 total scanned