3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (range(1,1000) as $int) { echo trim('=', base64_encode($int))."\n"; $trimmed = base64_decode(trim('=', base64_encode($int))); $untrimmed = base64_decode(base64_encode($int)); echo "{$int}: TRIMMED:" . ($trimmed == $int ? 'Pass' : 'Fail') . " ({$trimmed}) " . " UNTRIMMED: " . ($untrimmed == $int ? 'Pass' : 'Fail') . "({$untrimmed})" . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 59
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 59
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
Branch analysis from position: 50
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
filename:       /in/vDSHv
function name:  (null)
number of ops:  61
compiled vars:  !0 = $int, !1 = $trimmed, !2 = $untrimmed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 1000
          3        DO_ICALL                                         $3      
          4      > FE_RESET_R                                       $4      $3, ->59
          5    > > FE_FETCH_R                                               $4, !0, ->59
    3     6    >   INIT_FCALL                                               'trim'
          7        SEND_VAL                                                 '%3D'
          8        INIT_FCALL                                               'base64_encode'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                         $6      
         13        CONCAT                                           ~7      $6, '%0A'
         14        ECHO                                                     ~7
    4    15        INIT_FCALL                                               'base64_decode'
         16        INIT_FCALL                                               'trim'
         17        SEND_VAL                                                 '%3D'
         18        INIT_FCALL                                               'base64_encode'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
         24        DO_ICALL                                         $10     
         25        ASSIGN                                                   !1, $10
    5    26        INIT_FCALL                                               'base64_decode'
         27        INIT_FCALL                                               'base64_encode'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $12     
         30        SEND_VAR                                                 $12
         31        DO_ICALL                                         $13     
         32        ASSIGN                                                   !2, $13
    6    33        NOP                                                      
         34        FAST_CONCAT                                      ~15     !0, '%3A+TRIMMED%3A'
         35        IS_EQUAL                                                 !1, !0
         36      > JMPZ                                                     ~16, ->39
         37    >   QM_ASSIGN                                        ~17     'Pass'
         38      > JMP                                                      ->40
         39    >   QM_ASSIGN                                        ~17     'Fail'
         40    >   CONCAT                                           ~18     ~15, ~17
         41        ROPE_INIT                                     3  ~20     '+%28'
         42        ROPE_ADD                                      1  ~20     ~20, !1
         43        ROPE_END                                      2  ~19     ~20, '%29+'
         44        CONCAT                                           ~22     ~18, ~19
    7    45        CONCAT                                           ~23     ~22, '+UNTRIMMED%3A+'
         46        IS_EQUAL                                                 !2, !0
         47      > JMPZ                                                     ~24, ->50
         48    >   QM_ASSIGN                                        ~25     'Pass'
         49      > JMP                                                      ->51
         50    >   QM_ASSIGN                                        ~25     'Fail'
         51    >   CONCAT                                           ~26     ~23, ~25
         52        ROPE_INIT                                     3  ~28     '%28'
         53        ROPE_ADD                                      1  ~28     ~28, !2
         54        ROPE_END                                      2  ~27     ~28, '%29'
         55        CONCAT                                           ~30     ~26, ~27
   10    56        CONCAT                                           ~31     ~30, '%0A'
         57        ECHO                                                     ~31
    2    58      > JMP                                                      ->5
         59    >   FE_FREE                                                  $4
   12    60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.51 ms | 1400 KiB | 21 Q