3v4l.org

run code in 300+ 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 = 24
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 24
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 40
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 40
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 24
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:  42
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, ->24
         16    > > FE_FETCH_R                                               $16, !3, ->24
   13    17    >   INIT_FCALL                                               'strtr'
         18        SEND_VAR                                                 !3
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $18     
         21        ASSIGN_DIM                                               !4
         22        OP_DATA                                                  $18
   12    23      > JMP                                                      ->16
         24    >   FE_FREE                                                  $16
   16    25      > FE_RESET_R                                       $19     !1, ->40
         26    > > FE_FETCH_R                                       ~20     $19, !5, ->40
         27    >   ASSIGN                                                   !6, ~20
   18    28        INIT_FCALL                                               'str_pad'
         29        SEND_VAR                                                 !5
         30        SEND_VAL                                                 15
         31        SEND_VAL                                                 '+'
         32        SEND_VAL                                                 0
         33        DO_ICALL                                         $22     
         34        CONCAT                                           ~23     $22, '+%3D%3D%3D%3D%3D%3D%3D%3E+'
         35        FETCH_DIM_R                                      ~24     !4, !6
         36        CONCAT                                           ~25     ~23, ~24
         37        CONCAT                                           ~26     ~25, '%0A'
         38        ECHO                                                     ~26
   16    39      > JMP                                                      ->26
         40    >   FE_FREE                                                  $19
   19    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.37 ms | 1005 KiB | 16 Q