3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "aa\" b \x27 c"; $sum = 0; $inputs = explode("\n", $input); for($i = 0; $i<count($inputs); $i++){ $ns = addslashes($inputs[$i]); echo preg_match("/\\^[\"]/",$ns); for($j = 0; $j<strlen($ns); $j++){ $sum++; echo $ns[$j]."|"; } if(preg_match("/\\[^\"]/",$ns)>0){ $sum+=2; } //$sum-= strlen($inputs[$i]); } echo $sum;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 9
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 21
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 9
Branch analysis from position: 40
Branch analysis from position: 9
Branch analysis from position: 36
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 21
Branch analysis from position: 29
Branch analysis from position: 21
filename:       /in/Ua89f
function name:  (null)
number of ops:  42
compiled vars:  !0 = $input, !1 = $sum, !2 = $inputs, !3 = $i, !4 = $ns, !5 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'aa%22+b+%27+c'
    3     1        ASSIGN                                                   !1, 0
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
    6     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->37
    7     9    >   INIT_FCALL                                               'addslashes'
         10        FETCH_DIM_R                                      ~11     !2, !3
         11        SEND_VAL                                                 ~11
         12        DO_ICALL                                         $12     
         13        ASSIGN                                                   !4, $12
    8    14        INIT_FCALL                                               'preg_match'
         15        SEND_VAL                                                 '%2F%5C%5E%5B%22%5D%2F'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $14     
         18        ECHO                                                     $14
    9    19        ASSIGN                                                   !5, 0
         20      > JMP                                                      ->26
   10    21    >   PRE_INC                                                  !1
   11    22        FETCH_DIM_R                                      ~17     !4, !5
         23        CONCAT                                           ~18     ~17, '%7C'
         24        ECHO                                                     ~18
    9    25        PRE_INC                                                  !5
         26    >   STRLEN                                           ~20     !4
         27        IS_SMALLER                                               !5, ~20
         28      > JMPNZ                                                    ~21, ->21
   13    29    >   INIT_FCALL                                               'preg_match'
         30        SEND_VAL                                                 '%2F%5C%5B%5E%22%5D%2F'
         31        SEND_VAR                                                 !4
         32        DO_ICALL                                         $22     
         33        IS_SMALLER                                               0, $22
         34      > JMPZ                                                     ~23, ->36
   14    35    >   ASSIGN_OP                                     1          !1, 2
    6    36    >   PRE_INC                                                  !3
         37    >   COUNT                                            ~26     !2
         38        IS_SMALLER                                               !3, ~26
         39      > JMPNZ                                                    ~27, ->9
   19    40    >   ECHO                                                     !1
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.07 ms | 1400 KiB | 19 Q