3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (range(1,1000) as $int) { $trimmed = 'f';//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 = 40
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 40
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
Branch analysis from position: 31
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/lQJLY
function name:  (null)
number of ops:  42
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, ->40
          5    > > FE_FETCH_R                                               $4, !0, ->40
    3     6    >   ASSIGN                                                   !1, 'f'
    4     7        INIT_FCALL                                               'base64_decode'
          8        INIT_FCALL                                               'base64_encode'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !2, $7
    5    14        NOP                                                      
         15        FAST_CONCAT                                      ~9      !0, '%3A+TRIMMED%3A'
         16        IS_EQUAL                                                 !1, !0
         17      > JMPZ                                                     ~10, ->20
         18    >   QM_ASSIGN                                        ~11     'Pass'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~11     'Fail'
         21    >   CONCAT                                           ~12     ~9, ~11
         22        ROPE_INIT                                     3  ~14     '+%28'
         23        ROPE_ADD                                      1  ~14     ~14, !1
         24        ROPE_END                                      2  ~13     ~14, '%29+'
         25        CONCAT                                           ~16     ~12, ~13
    6    26        CONCAT                                           ~17     ~16, '+UNTRIMMED%3A+'
         27        IS_EQUAL                                                 !2, !0
         28      > JMPZ                                                     ~18, ->31
         29    >   QM_ASSIGN                                        ~19     'Pass'
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~19     'Fail'
         32    >   CONCAT                                           ~20     ~17, ~19
         33        ROPE_INIT                                     3  ~22     '%28'
         34        ROPE_ADD                                      1  ~22     ~22, !2
         35        ROPE_END                                      2  ~21     ~22, '%29'
         36        CONCAT                                           ~24     ~20, ~21
    9    37        CONCAT                                           ~25     ~24, '%0A'
         38        ECHO                                                     ~25
    2    39      > JMP                                                      ->5
         40    >   FE_FREE                                                  $4
   11    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.36 ms | 1400 KiB | 19 Q