3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "11a. A numbered agenda item\nUnnumbered agenda item\n12. Another numbered agenda item\nAnother UNnumbered agenda item\n13. A numbered agenda item"; if (preg_match_all('/^(\d+[a-z]?\.)\s*(.*(?:\R(?!\d+[a-z]?\.).*)*)/m', $text, $matches)) { print_r(array_combine($matches[1], $matches[2])); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/OYhTE
function name:  (null)
number of ops:  17
compiled vars:  !0 = $text, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '11a.+A+numbered+agenda+item%0AUnnumbered+agenda+item%0A12.+Another+numbered+agenda+item%0AAnother+UNnumbered+agenda+item%0A13.+A+numbered+agenda+item'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5E%28%5Cd%2B%5Ba-z%5D%3F%5C.%29%5Cs%2A%28.%2A%28%3F%3A%5CR%28%3F%21%5Cd%2B%5Ba-z%5D%3F%5C.%29.%2A%29%2A%29%2Fm'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->16
    5     7    >   INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_combine'
          9        FETCH_DIM_R                                      ~4      !1, 1
         10        SEND_VAL                                                 ~4
         11        FETCH_DIM_R                                      ~5      !1, 2
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
    6    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.58 ms | 1399 KiB | 19 Q