3v4l.org

run code in 300+ PHP versions simultaneously
<?php $User = array( 'Name' => "Hans-Peterµµ", 'Contacts' => array(1, 2, 3, 4, 5, 6, 7, 42), 'Active' => 1 ); $J = json_encode($User); foreach ($J as &$val) { $val = preg_replace_callback('/\\\\u([0-9a-f]{4})/i', function($matches) { return mb_convert_encoding(pack('H*', $matches[1]), 'UTF-8', 'UTF-16'); }, $val); } echo $J;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
2 jumps found. (Code = 126) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/skmaT
function name:  (null)
number of ops:  18
compiled vars:  !0 = $User, !1 = $J, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
          5      > FE_RESET_RW                                      $6      !1, ->15
          6    > > FE_FETCH_RW                                              $6, !2, ->15
    8     7    >   INIT_FCALL                                               'preg_replace_callback'
          8        SEND_VAL                                                 '%2F%5C%5Cu%28%5B0-9a-f%5D%7B4%7D%29%2Fi'
    9     9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FskmaT%3A9%240'
   11    10        SEND_VAL                                                 ~7
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $8      
    8    13        ASSIGN                                                   !2, $8
    7    14      > JMP                                                      ->6
         15    >   FE_FREE                                                  $6
   13    16        ECHO                                                     !1
         17      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FskmaT%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.44 ms | 1401 KiB | 21 Q