3v4l.org

run code in 500+ PHP versions simultaneously
<?php $um = [ '\\\\' => '\\', '\\n' => "[NL]", ]; $inputs = []; for ($i=1;$i<=14;$i++) { $inputs[] = ''.str_repeat("\\", $i)."n"; } foreach ($inputs as $input) { $results[] = strtr($input, $um); } foreach ($inputs as $key=>$value) { echo str_pad($value, 15, ' ',STR_PAD_LEFT)." =======> ".$results[$key]."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 37
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 37
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 21
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/5tebZ
function name:  (null)
number of ops:  39
compiled vars:  !0 = $um, !1 = $inputs, !2 = $i, !3 = $input, !4 = $results, !5 = $value, !6 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    7     1        ASSIGN                                                       !1, <array>
    8     2        ASSIGN                                                       !2, 1
          3      > JMP                                                          ->13
    9     4    >   INIT_FCALL                                                   'str_repeat'
          5        SEND_VAL                                                     '%5C'
          6        SEND_VAR                                                     !2
          7        DO_ICALL                                             $11     
          8        CONCAT                                               ~12     '', $11
          9        CONCAT                                               ~13     ~12, 'n'
         10        ASSIGN_DIM                                                   !1
         11        OP_DATA                                                      ~13
    8    12        PRE_INC                                                      !2
         13    >   IS_SMALLER_OR_EQUAL                                          !2, 14
         14      > JMPNZ                                                        ~15, ->4
   12    15    > > FE_RESET_R                                           $16     !1, ->21
         16    > > FE_FETCH_R                                                   $16, !3, ->21
   13    17    >   FRAMELESS_ICALL_2                strtr               ~18     !3, !0
         18        ASSIGN_DIM                                                   !4
         19        OP_DATA                                                      ~18
   12    20      > JMP                                                          ->16
         21    >   FE_FREE                                                      $16
   16    22      > FE_RESET_R                                           $19     !1, ->37
         23    > > FE_FETCH_R                                           ~20     $19, !5, ->37
         24    >   ASSIGN                                                       !6, ~20
   18    25        INIT_FCALL                                                   'str_pad'
         26        SEND_VAR                                                     !5
         27        SEND_VAL                                                     15
         28        SEND_VAL                                                     '+'
         29        SEND_VAL                                                     0
         30        DO_ICALL                                             $22     
         31        CONCAT                                               ~23     $22, '+%3D%3D%3D%3D%3D%3D%3D%3E+'
         32        FETCH_DIM_R                                          ~24     !4, !6
         33        CONCAT                                               ~25     ~23, ~24
         34        CONCAT                                               ~26     ~25, '%0A'
         35        ECHO                                                         ~26
   16    36      > JMP                                                          ->23
         37    >   FE_FREE                                                      $19
   19    38      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.8 ms | 2210 KiB | 15 Q