3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chars = explode(", ", "¦, '¨, '?, '´, '¸, 'À, 'Á, 'Â, 'Ã, 'Ä, 'Å"); $products = array(); for($i=0; $i < 10; $i++) { $product = array(); $product["pid"] = $chars[$i]; $products[] = array_map("utf8_encode", $product);; // insert product into array } $data = array( 'success' => 1, 'products' => $products ); $json = json_encode($data, JSON_PRETTY_PRINT); echo $json; var_dump(json_decode($json, true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
Branch analysis from position: 8
filename:       /in/qnvpe
function name:  (null)
number of ops:  38
compiled vars:  !0 = $chars, !1 = $products, !2 = $i, !3 = $product, !4 = $data, !5 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%2C+'
          2        SEND_VAL                                                 '%C3%82%C2%A6%2C+%27%C3%82%C2%A8%2C+%27%3F%2C+%27%C3%82%C2%B4%2C+%27%C3%82%C2%B8%2C+%27%C3%83%E2%82%AC%2C+%27%C3%83%C2%81%2C+%27%C3%83%E2%80%9A%2C+%27%C3%83%C6%92%2C+%27%C3%83%E2%80%9E%2C+%27%C3%83%E2%80%A6'
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    4     5        ASSIGN                                                   !1, <array>
    5     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->19
    6     8    >   ASSIGN                                                   !3, <array>
    7     9        FETCH_DIM_R                                      ~12     !0, !2
         10        ASSIGN_DIM                                               !3, 'pid'
         11        OP_DATA                                                  ~12
    9    12        INIT_FCALL                                               'array_map'
         13        SEND_VAL                                                 'utf8_encode'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $14     
         16        ASSIGN_DIM                                               !1
         17        OP_DATA                                                  $14
    5    18        PRE_INC                                                  !2
         19    >   IS_SMALLER                                               !2, 10
         20      > JMPNZ                                                    ~16, ->8
   13    21    >   INIT_ARRAY                                       ~17     1, 'success'
   14    22        ADD_ARRAY_ELEMENT                                ~17     !1, 'products'
   12    23        ASSIGN                                                   !4, ~17
   17    24        INIT_FCALL                                               'json_encode'
         25        SEND_VAR                                                 !4
         26        SEND_VAL                                                 128
         27        DO_ICALL                                         $19     
         28        ASSIGN                                                   !5, $19
   18    29        ECHO                                                     !5
   19    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'json_decode'
         32        SEND_VAR                                                 !5
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $21     
         35        SEND_VAR                                                 $21
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.28 ms | 1400 KiB | 23 Q