3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.37 ms | 1400 KiB | 21 Q