3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** by www.phpddt.com */ $arr = array("a"=>"PHP","b"=>"中国"); echo json_encode($arr); //中文乱码:["PHP","\u4e2d\u56fd"] //json_encode前对变量urlencode即可 foreach ($arr as $k => $v){ $arr[$k] = urlencode($v); } echo urldecode(json_encode($arr)); //{"a":"PHP","b":"中国"} $str=md5('test');echo hexdec($str)%3; print_r( json_decode('[{"item_id": 21,"title": "可口可乐600ml"}]',true)); print_r( json_decode('{"item_id": 21,"title": "可口可乐600ml"}',true)); print_r(array_flip(array_flip(array(1,2,3))));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/n0ILF
function name:  (null)
number of ops:  55
compiled vars:  !0 = $arr, !1 = $v, !2 = $k, !3 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ECHO                                                     $5
    6     5      > FE_RESET_R                                       $6      !0, ->14
          6    > > FE_FETCH_R                                       ~7      $6, !1, ->14
          7    >   ASSIGN                                                   !2, ~7
    7     8        INIT_FCALL                                               'urlencode'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        ASSIGN_DIM                                               !0, !2
         12        OP_DATA                                                  $10
    6    13      > JMP                                                      ->6
         14    >   FE_FREE                                                  $6
    9    15        INIT_FCALL                                               'urldecode'
         16        INIT_FCALL                                               'json_encode'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                         $12     
         21        ECHO                                                     $12
   13    22        INIT_FCALL                                               'md5'
         23        SEND_VAL                                                 'test'
         24        DO_ICALL                                         $13     
         25        ASSIGN                                                   !3, $13
         26        INIT_FCALL                                               'hexdec'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $15     
         29        MOD                                              ~16     $15, 3
         30        ECHO                                                     ~16
   14    31        INIT_FCALL                                               'print_r'
         32        INIT_FCALL                                               'json_decode'
         33        SEND_VAL                                                 '%5B%7B%22item_id%22%3A+21%2C%22title%22%3A+%22%E5%8F%AF%E5%8F%A3%E5%8F%AF%E4%B9%90600ml%22%7D%5D'
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $17     
         36        SEND_VAR                                                 $17
         37        DO_ICALL                                                 
   15    38        INIT_FCALL                                               'print_r'
         39        INIT_FCALL                                               'json_decode'
         40        SEND_VAL                                                 '%7B%22item_id%22%3A+21%2C%22title%22%3A+%22%E5%8F%AF%E5%8F%A3%E5%8F%AF%E4%B9%90600ml%22%7D'
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $19     
         43        SEND_VAR                                                 $19
         44        DO_ICALL                                                 
   16    45        INIT_FCALL                                               'print_r'
         46        INIT_FCALL                                               'array_flip'
         47        INIT_FCALL                                               'array_flip'
         48        SEND_VAL                                                 <array>
         49        DO_ICALL                                         $21     
         50        SEND_VAR                                                 $21
         51        DO_ICALL                                         $22     
         52        SEND_VAR                                                 $22
         53        DO_ICALL                                                 
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.46 ms | 1392 KiB | 29 Q