3v4l.org

run code in 300+ PHP versions simultaneously
<? echo "-"; if(preg_match('[0-9a-zA-Z]', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } echo "-"; if(preg_match('~[0-9a-zA-Z]~', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } echo "-"; if(preg_match('~[0-9a-zA-Z]+~', 'bob')) { echo preg_match('[0-9a-zA-Z]', 'bob'); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 22
Branch analysis from position: 11
filename:       /in/cnNEH
function name:  (null)
number of ops:  34
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '-'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%5B0-9a-zA-Z%5D'
          3        SEND_VAL                                                 'bob'
          4        DO_ICALL                                         $0      
          5      > JMPZ                                                     $0, ->11
    5     6    >   INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%5B0-9a-zA-Z%5D'
          8        SEND_VAL                                                 'bob'
          9        DO_ICALL                                         $1      
         10        ECHO                                                     $1
    6    11    >   ECHO                                                     '-'
    8    12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%7E%5B0-9a-zA-Z%5D%7E'
         14        SEND_VAL                                                 'bob'
         15        DO_ICALL                                         $2      
         16      > JMPZ                                                     $2, ->22
    9    17    >   INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%5B0-9a-zA-Z%5D'
         19        SEND_VAL                                                 'bob'
         20        DO_ICALL                                         $3      
         21        ECHO                                                     $3
   10    22    >   ECHO                                                     '-'
   12    23        INIT_FCALL                                               'preg_match'
         24        SEND_VAL                                                 '%7E%5B0-9a-zA-Z%5D%2B%7E'
         25        SEND_VAL                                                 'bob'
         26        DO_ICALL                                         $4      
         27      > JMPZ                                                     $4, ->33
   13    28    >   INIT_FCALL                                               'preg_match'
         29        SEND_VAL                                                 '%5B0-9a-zA-Z%5D'
         30        SEND_VAL                                                 'bob'
         31        DO_ICALL                                         $5      
         32        ECHO                                                     $5
   15    33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.05 ms | 1388 KiB | 15 Q