3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '/a/{bb}/{d{b}}/{as}df}/b{cb}/a{sdfas/dsgf}'; var_export( preg_match( '~(?:^|/){([^{}/]*)}(?:/|$)~', $string, $out ) ? $out : 'no match' );
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 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7u7l4
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string, !1 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fa%2F%7Bbb%7D%2F%7Bd%7Bb%7D%7D%2F%7Bas%7Ddf%7D%2Fb%7Bcb%7D%2Fa%7Bsdfas%2Fdsgf%7D'
    5     1        INIT_FCALL                                               'var_export'
    6     2        INIT_FCALL                                               'preg_match'
    7     3        SEND_VAL                                                 '%7E%28%3F%3A%5E%7C%2F%29%7B%28%5B%5E%7B%7D%2F%5D%2A%29%7D%28%3F%3A%2F%7C%24%29%7E'
    8     4        SEND_VAR                                                 !0
    9     5        SEND_REF                                                 !1
    6     6        DO_ICALL                                         $3      
    9     7      > JMPZ                                                     $3, ->10
   11     8    >   QM_ASSIGN                                        ~4      !1
          9      > JMP                                                      ->11
   12    10    >   QM_ASSIGN                                        ~4      'no+match'
         11    >   SEND_VAL                                                 ~4
    5    12        DO_ICALL                                                 
   13    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1010 KiB | 15 Q