3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = "/user12345 lorem ipsum dolor"; if (!preg_match('~^/user(\d+) (.+)~', $x, $match)) { echo 'no match'; } else { [, $x1, $x2] = $match; var_export($x1); echo "\n"; var_export($x2); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y2moM
function name:  (null)
number of ops:  24
compiled vars:  !0 = $x, !1 = $match, !2 = $x1, !3 = $x2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fuser12345+lorem+ipsum+dolor'
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7E%5E%2Fuser%28%5Cd%2B%29+%28.%2B%29%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $5      
          6        BOOL_NOT                                         ~6      $5
          7      > JMPZ                                                     ~6, ->10
    6     8    >   ECHO                                                     'no+match'
          9      > JMP                                                      ->23
    8    10    >   QM_ASSIGN                                        ~7      !1
         11        FETCH_LIST_R                                     $8      ~7, 1
         12        ASSIGN                                                   !2, $8
         13        FETCH_LIST_R                                     $10     ~7, 2
         14        ASSIGN                                                   !3, $10
         15        FREE                                                     ~7
    9    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
   10    19        ECHO                                                     '%0A'
   11    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
   12    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.39 ms | 1400 KiB | 17 Q