3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str='0x0fc929cc'; $regex='/[0-9a-f]{3,5}(c+)$/i'; preg_match($regex,$str); if (preg_match($regex,$str,$matches)){ echo $matches[1];} else { echo 'b'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BX4tQ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '0x0fc929cc'
    3     1        ASSIGN                                                   !1, '%2F%5B0-9a-f%5D%7B3%2C5%7D%28c%2B%29%24%2Fi'
    4     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        SEND_REF                                                 !2
         10        DO_ICALL                                         $6      
         11      > JMPZ                                                     $6, ->15
    6    12    >   FETCH_DIM_R                                      ~7      !2, 1
         13        ECHO                                                     ~7
         14      > JMP                                                      ->16
    8    15    >   ECHO                                                     'b'
   10    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1386 KiB | 15 Q