3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ( !function_exists( 'mb_convert_encoding' ) ) { exit('[mbstring not loaded]'); } $oldSub = mb_substitute_character(); mb_substitute_character( 0xfffd ); $res = mb_convert_encoding( "\xf4\x90\x80\x80 \xc2", 'UTF-8', 'UTF-8' ); mb_substitute_character( $oldSub ); var_dump( bin2hex( $res ) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/45mDV
function name:  (null)
number of ops:  28
compiled vars:  !0 = $oldSub, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'mb_convert_encoding'
          2        DO_ICALL                                         $2      
          3        BOOL_NOT                                         ~3      $2
          4      > JMPZ                                                     ~3, ->6
    4     5    > > EXIT                                                     '%5Bmbstring+not+loaded%5D'
    7     6    >   INIT_FCALL                                               'mb_substitute_character'
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !0, $4
    8     9        INIT_FCALL                                               'mb_substitute_character'
         10        SEND_VAL                                                 65533
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'mb_convert_encoding'
         13        SEND_VAL                                                 '%F4%90%80%80+%C2'
         14        SEND_VAL                                                 'UTF-8'
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
   10    18        INIT_FCALL                                               'mb_substitute_character'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
   12    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'bin2hex'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $10     
         25        SEND_VAR                                                 $10
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.64 ms | 1395 KiB | 23 Q