3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json_arr='{"#D1 1":"750x225","#D1 2":"735x450","#D1 3":"750x216","#D2 1":"750x450","#D2 2":"735x450"}'; $encode=json_decode($json_arr); $out = $sep = ''; foreach( $encode as $key => $value ) { $out .= $sep . $key . ':' . $value; $sep = ' ,'; } print_r($out);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/5eMjo
function name:  (null)
number of ops:  21
compiled vars:  !0 = $json_arr, !1 = $encode, !2 = $out, !3 = $sep, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%22%23D1++1%22%3A%22750x225%22%2C%22%23D1++2%22%3A%22735x450%22%2C%22%23D1++3%22%3A%22750x216%22%2C%22%23D2++1%22%3A%22750x450%22%2C%22%23D2++2%22%3A%22735x450%22%7D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    4     5        ASSIGN                                           ~9      !3, ''
          6        ASSIGN                                                   !2, ~9
    5     7      > FE_RESET_R                                       $11     !1, ->16
          8    > > FE_FETCH_R                                       ~12     $11, !4, ->16
          9    >   ASSIGN                                                   !5, ~12
    6    10        CONCAT                                           ~14     !3, !5
         11        CONCAT                                           ~15     ~14, '%3A'
         12        CONCAT                                           ~16     ~15, !4
         13        ASSIGN_OP                                     8          !2, ~16
    7    14        ASSIGN                                                   !3, '+%2C'
    5    15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $11
   10    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.04 ms | 1395 KiB | 17 Q