3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr='[2,5,"test"]'; $cat_limit = json_decode($arr, true);var_dump($cat_limit); echo implode($cat_limit, ','); $arr2='{"luo":{"item_id": 21,"title": "可口可乐600ml"},"tt":{"item_id": 22,"title": "可口可乐600ml"}}'; $cat_limit = json_decode($arr2, true);var_dump($cat_limit); $arr=[1,2,66,88]; $aitem_ids = explode(',', $arr); $aitem_ids = array_flip(array_flip($aitem_ids)); echo implode($aitem_ids, ','); unset($arr[5]); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jrYpP
function name:  (null)
number of ops:  46
compiled vars:  !0 = $arr, !1 = $cat_limit, !2 = $arr2, !3 = $aitem_ids
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5B2%2C5%2C%22test%22%5D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
          6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'implode'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 '%2C'
         12        DO_ICALL                                         $8      
         13        ECHO                                                     $8
    7    14        ASSIGN                                                   !2, '%7B%22luo%22%3A%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%2C%22tt%22%3A%7B%22item_id%22%3A+22%2C%22title%22%3A+%22%E5%8F%AF%E5%8F%A3%E5%8F%AF%E4%B9%90600ml%22%7D%7D'
    8    15        INIT_FCALL                                               'json_decode'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !1, $10
         20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
   10    23        ASSIGN                                                   !0, <array>
   14    24        INIT_FCALL                                               'explode'
         25        SEND_VAL                                                 '%2C'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $14     
         28        ASSIGN                                                   !3, $14
   15    29        INIT_FCALL                                               'array_flip'
         30        INIT_FCALL                                               'array_flip'
         31        SEND_VAR                                                 !3
         32        DO_ICALL                                         $16     
         33        SEND_VAR                                                 $16
         34        DO_ICALL                                         $17     
         35        ASSIGN                                                   !3, $17
   16    36        INIT_FCALL                                               'implode'
         37        SEND_VAR                                                 !3
         38        SEND_VAL                                                 '%2C'
         39        DO_ICALL                                         $19     
         40        ECHO                                                     $19
   17    41        UNSET_DIM                                                !0, 5
   19    42        INIT_FCALL                                               'var_dump'
         43        SEND_VAR                                                 !0
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.81 ms | 1400 KiB | 23 Q