3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '\u00c3\u0096sterreich'; $str = preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function ($match) { return utf8_decode(mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE')); }, $str); print_r( $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a6BG7
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5Cu00c3%5Cu0096sterreich'
    5     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%5C%5Cu%28%5B0-9a-fA-F%5D%7B4%7D%29%2F'
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    7     4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
    5     6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    9     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a6BG7
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'utf8_decode'
          2        INIT_FCALL                                               'mb_convert_encoding'
          3        INIT_FCALL                                               'pack'
          4        SEND_VAL                                                 'H%2A'
          5        FETCH_DIM_R                                      ~1      !0, 1
          6        SEND_VAL                                                 ~1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 'UTF-8'
         10        SEND_VAL                                                 'UCS-2BE'
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_FCALL_BY_NAME                                         
         14      > RETURN                                                   $4
    7    15*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.26 ms | 1003 KiB | 18 Q