3v4l.org

run code in 300+ PHP versions simultaneously
<?php // UNIT_MARKER_INVALID_CHARS = '_/\n<>'; echo $ic = preg_quote( '_/\n<>', '~'); var_dump( preg_match( "~[$ic]~", 'this-contains-letter-n' ) ); var_dump( preg_match( "~[$ic]~", 'this-comtaims-letter-m' ) ); var_dump( preg_match( "~[$ic]~", 'aaa' ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VrNvf
function name:  (null)
number of ops:  37
compiled vars:  !0 = $ic
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'preg_quote'
          1        SEND_VAL                                                 '_%2F%5Cn%3C%3E'
          2        SEND_VAL                                                 '%7E'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                           ~2      !0, $1
          5        ECHO                                                     ~2
    6     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'preg_match'
          8        ROPE_INIT                                     3  ~4      '%7E%5B'
          9        ROPE_ADD                                      1  ~4      ~4, !0
         10        ROPE_END                                      2  ~3      ~4, '%5D%7E'
         11        SEND_VAL                                                 ~3
         12        SEND_VAL                                                 'this-contains-letter-n'
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'preg_match'
         18        ROPE_INIT                                     3  ~9      '%7E%5B'
         19        ROPE_ADD                                      1  ~9      ~9, !0
         20        ROPE_END                                      2  ~8      ~9, '%5D%7E'
         21        SEND_VAL                                                 ~8
         22        SEND_VAL                                                 'this-comtaims-letter-m'
         23        DO_ICALL                                         $11     
         24        SEND_VAR                                                 $11
         25        DO_ICALL                                                 
    8    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'preg_match'
         28        ROPE_INIT                                     3  ~14     '%7E%5B'
         29        ROPE_ADD                                      1  ~14     ~14, !0
         30        ROPE_END                                      2  ~13     ~14, '%5D%7E'
         31        SEND_VAL                                                 ~13
         32        SEND_VAL                                                 'aaa'
         33        DO_ICALL                                         $16     
         34        SEND_VAR                                                 $16
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.55 ms | 1396 KiB | 19 Q