3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = "test"; if(!mb_check_encoding($output, 'UTF-8')) { if(mb_check_encoding($output, 'ISO-8859-1')) { $output = utf8_encode($output); } else { $output = mb_convert_encoding($content, 'UTF-8'); } } return $output; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/sIDhs
function name:  (null)
number of ops:  24
compiled vars:  !0 = $output, !1 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test'
    5     1        INIT_FCALL                                               'mb_check_encoding'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'UTF-8'
          4        DO_ICALL                                         $3      
          5        BOOL_NOT                                         ~4      $3
          6      > JMPZ                                                     ~4, ->22
    6     7    >   INIT_FCALL                                               'mb_check_encoding'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 'ISO-8859-1'
         10        DO_ICALL                                         $5      
         11      > JMPZ                                                     $5, ->17
    7    12    >   INIT_FCALL                                               'utf8_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !0, $6
         16      > JMP                                                      ->22
    9    17    >   INIT_FCALL                                               'mb_convert_encoding'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 'UTF-8'
         20        DO_ICALL                                         $8      
         21        ASSIGN                                                   !0, $8
   12    22    > > RETURN                                                   !0
   13    23*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.43 ms | 1395 KiB | 19 Q