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 ); foreach ($User 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); $J = json_encode($User);} echo $J;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/dnRo1
function name:  (null)
number of ops:  18
compiled vars:  !0 = $User, !1 = $val, !2 = $J
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1      > FE_RESET_RW                                      $4      !0, ->15
          2    > > FE_FETCH_RW                                              $4, !1, ->15
    7     3    >   INIT_FCALL                                               'preg_replace_callback'
          4        SEND_VAL                                                 '%2F%5C%5Cu%28%5B0-9a-f%5D%7B4%7D%29%2Fi'
    8     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FdnRo1%3A8%240'
   10     6        SEND_VAL                                                 ~5
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
    7     9        ASSIGN                                                   !1, $6
   11    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
    6    14      > JMP                                                      ->2
         15    >   FE_FREE                                                  $4
   12    16        ECHO                                                     !2
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FdnRo1%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dnRo1
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     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
   10    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FdnRo1%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.08 ms | 1396 KiB | 21 Q