3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = "some\xc2\xa0 text "; var_dump(mb_convert_encoding($test, 'UTF-7', 'UTF-8')); var_dump(mb_convert_encoding($test, 'UCS-2', 'UTF-8')); var_dump(mb_detect_encoding($test, ['UTF-7', 'UCS-2', 'UTF-8']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/poCsC
function name:  (null)
number of ops:  25
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'some%C2%A0+text+'
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'mb_convert_encoding'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'UTF-7'
          5        SEND_VAL                                                 'UTF-8'
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'mb_convert_encoding'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 'UCS-2'
         13        SEND_VAL                                                 'UTF-8'
         14        DO_ICALL                                         $4      
         15        SEND_VAR                                                 $4
         16        DO_ICALL                                                 
    7    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'mb_detect_encoding'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 <array>
         21        DO_ICALL                                         $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.78 ms | 1395 KiB | 19 Q