3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 'García'; if(utf8_encode(utf8_decode($input))== $input) $input = utf8_decode($input) . '1'; else if(utf8_decode($input)== $input) $input = utf8_encode($input) . '2'; echo $input; print "\n"; $input = 'García'; if(utf8_decode($input)== $input){ $input = utf8_encode($input) . '1'; } else if((utf8_encode($input))== $input) $input = utf8_encode($input) . '2'; echo $input; print "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 49
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
Branch analysis from position: 39
Branch analysis from position: 25
filename:       /in/Bg6I6
function name:  (null)
number of ops:  52
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Garc%C3%ADa'
    4     1        INIT_FCALL                                               'utf8_encode'
          2        INIT_FCALL                                               'utf8_decode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                         $3      
          7        IS_EQUAL                                                 !0, $3
          8      > JMPZ                                                     ~4, ->15
    5     9    >   INIT_FCALL                                               'utf8_decode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        CONCAT                                           ~6      $5, '1'
         13        ASSIGN                                                   !0, ~6
         14      > JMP                                                      ->25
    6    15    >   INIT_FCALL                                               'utf8_decode'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        IS_EQUAL                                                 !0, $8
         19      > JMPZ                                                     ~9, ->25
    7    20    >   INIT_FCALL                                               'utf8_encode'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $10     
         23        CONCAT                                           ~11     $10, '2'
         24        ASSIGN                                                   !0, ~11
    9    25    >   ECHO                                                     !0
   10    26        ECHO                                                     '%0A'
   13    27        ASSIGN                                                   !0, 'Garc%C3%83%C2%ADa'
   14    28        INIT_FCALL                                               'utf8_decode'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $14     
         31        IS_EQUAL                                                 !0, $14
         32      > JMPZ                                                     ~15, ->39
   15    33    >   INIT_FCALL                                               'utf8_encode'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $16     
         36        CONCAT                                           ~17     $16, '1'
         37        ASSIGN                                                   !0, ~17
         38      > JMP                                                      ->49
   17    39    >   INIT_FCALL                                               'utf8_encode'
         40        SEND_VAR                                                 !0
         41        DO_ICALL                                         $19     
         42        IS_EQUAL                                                 !0, $19
         43      > JMPZ                                                     ~20, ->49
   18    44    >   INIT_FCALL                                               'utf8_encode'
         45        SEND_VAR                                                 !0
         46        DO_ICALL                                         $21     
         47        CONCAT                                           ~22     $21, '2'
         48        ASSIGN                                                   !0, ~22
   20    49    >   ECHO                                                     !0
   21    50        ECHO                                                     '%0A'
         51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.51 ms | 1400 KiB | 17 Q