3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo '<pre>'; $a = ' \\\n'; echo $a.'<br>'; if (preg_match('%[\\]{2}%i', $a, $regs)) { var_dump($regs); } else { echo 'Failed.'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1lFvG
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $regs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '%3Cpre%3E'
    4     1        ASSIGN                                                   !0, '+%5C%5Cn'
    5     2        CONCAT                                           ~3      !0, '%3Cbr%3E'
          3        ECHO                                                     ~3
    7     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%25%5B%5C%5D%7B2%7D%25i'
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !1
          8        DO_ICALL                                         $4      
          9      > JMPZ                                                     $4, ->14
    8    10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > JMP                                                      ->15
   10    14    >   ECHO                                                     'Failed.'
   11    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.95 ms | 1398 KiB | 18 Q