3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (preg_match("[a-zA-Z0-9]", 'a-zA-Z0-9')) { echo 'First Returned valid.'; } echo "\n"; if (preg_match("[a-zA-Z0-9.-]", 'a-zA-Z0-9#-')){ echo 'Middle Returned valid.'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 6
filename:       /in/G2eIC
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%5Ba-zA-Z0-9%5D'
          2        SEND_VAL                                                 'a-zA-Z0-9'
          3        DO_ICALL                                         $0      
          4      > JMPZ                                                     $0, ->6
    4     5    >   ECHO                                                     'First+Returned+valid.'
    6     6    >   ECHO                                                     '%0A'
    7     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 '%5Ba-zA-Z0-9.-%5D'
          9        SEND_VAL                                                 'a-zA-Z0-9%23-'
         10        DO_ICALL                                         $1      
         11      > JMPZ                                                     $1, ->13
    8    12    >   ECHO                                                     'Middle+Returned+valid.'
    9    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
204.67 ms | 1009 KiB | 14 Q