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'; echo $input; print "\n"; echo utf8_decode($input); print "\n"; echo utf8_encode($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
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/tmBfe
function name:  (null)
number of ops:  41
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        ECHO                                                     !0
   15    29        ECHO                                                     '%0A'
   16    30        INIT_FCALL                                               'utf8_decode'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $14     
         33        ECHO                                                     $14
   17    34        ECHO                                                     '%0A'
   18    35        INIT_FCALL                                               'utf8_encode'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                         $15     
         38        ECHO                                                     $15
   19    39        ECHO                                                     '%0A'
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.08 ms | 1405 KiB | 17 Q