3v4l.org

run code in 300+ PHP versions simultaneously
<?php $item_list = Array('2e2e','e2e54','54e2'); echo json_encode($item_list); $json = '{"params":["dsada","sdasd","dsadas"]}'; $decoded = json_decode($json, true); $decoded['params']; $list = Array(); foreach($decoded['params'] as $item){ array_push($list, "'".$item."'"); } echo var_dump($list);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/6gRPA
function name:  (null)
number of ops:  30
compiled vars:  !0 = $item_list, !1 = $json, !2 = $decoded, !3 = $list, !4 = $item
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                                         $6      
          4        ECHO                                                     $6
    7     5        ASSIGN                                                   !1, '%7B%22params%22%3A%5B%22dsada%22%2C%22sdasd%22%2C%22dsadas%22%5D%7D'
    8     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
   10    11        FETCH_DIM_R                                      ~10     !2, 'params'
         12        FREE                                                     ~10
   12    13        ASSIGN                                                   !3, <array>
   13    14        FETCH_DIM_R                                      ~12     !2, 'params'
         15      > FE_RESET_R                                       $13     ~12, ->24
         16    > > FE_FETCH_R                                               $13, !4, ->24
   14    17    >   INIT_FCALL                                               'array_push'
         18        SEND_REF                                                 !3
         19        CONCAT                                           ~14     '%27', !4
         20        CONCAT                                           ~15     ~14, '%27'
         21        SEND_VAL                                                 ~15
         22        DO_ICALL                                                 
   13    23      > JMP                                                      ->16
         24    >   FE_FREE                                                  $13
   17    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $17     
         28        ECHO                                                     $17
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.61 ms | 1396 KiB | 21 Q