3v4l.org

run code in 300+ PHP versions simultaneously
<?php $encoding = mb_internal_encoding(); $unicode = '00f0'; $test = mb_convert_encoding( pack('H*', $unicode), $encoding, 'UTF-16BE' ); var_dump(json_encode($test));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R2n04
function name:  (null)
number of ops:  21
compiled vars:  !0 = $encoding, !1 = $unicode, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mb_internal_encoding'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN                                                   !1, '00f0'
    5     4        INIT_FCALL                                               'mb_convert_encoding'
    6     5        INIT_FCALL                                               'pack'
          6        SEND_VAL                                                 'H%2A'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
    7    10        SEND_VAR                                                 !0
    8    11        SEND_VAL                                                 'UTF-16BE'
         12        DO_ICALL                                         $7      
    5    13        ASSIGN                                                   !2, $7
   11    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $9      
         18        SEND_VAR                                                 $9
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.89 ms | 1395 KiB | 23 Q