3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p = '/([a-z0-9]+\*(?:$|\s+))|([^\s]+)/'; $a = array('Optionsschei*', 'optionsschei*', 'Optionsschein', 'optionsschein', 'Optionsschei* test', 'optionsschei* test'); foreach ($a as $q) { echo "\n$q"; $res = preg_match_all($p, $q, $m); var_dump($m); var_dump($res); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/4BHPH
function name:  (null)
number of ops:  22
compiled vars:  !0 = $p, !1 = $a, !2 = $q, !3 = $res, !4 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F%28%5Ba-z0-9%5D%2B%5C%2A%28%3F%3A%24%7C%5Cs%2B%29%29%7C%28%5B%5E%5Cs%5D%2B%29%2F'
    3     1        ASSIGN                                                   !1, <array>
    4     2      > FE_RESET_R                                       $7      !1, ->20
          3    > > FE_FETCH_R                                               $7, !2, ->20
    5     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~8      '%0A', !2
          6        ECHO                                                     ~8
    6     7        INIT_FCALL                                               'preg_match_all'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !2
         10        SEND_REF                                                 !4
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !3, $9
    7    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !4
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
    4    19      > JMP                                                      ->3
         20    >   FE_FREE                                                  $7
    9    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.98 ms | 1395 KiB | 17 Q