3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data_array = array('root1' => array(1,2,3), 'root2' => array(3,4,5)); $out = ''; foreach ($data_array as $key => $value) { $out.= $key.'=>['; foreach ($value as $val) { $out.=$val.','; } $out = rtrim($out, ","); $out.= '],<br />'; } $out = rtrim($out,','); echo $out;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/OvNf9
function name:  (null)
number of ops:  28
compiled vars:  !0 = $data_array, !1 = $out, !2 = $value, !3 = $key, !4 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, ''
    5     2      > FE_RESET_R                                       $7      !0, ->20
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->20
          4    >   ASSIGN                                                   !3, ~8
    7     5        CONCAT                                           ~10     !3, '%3D%3E%5B'
          6        ASSIGN_OP                                     8          !1, ~10
    8     7      > FE_RESET_R                                       $12     !2, ->12
          8    > > FE_FETCH_R                                               $12, !4, ->12
    9     9    >   CONCAT                                           ~13     !4, '%2C'
         10        ASSIGN_OP                                     8          !1, ~13
    8    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $12
   11    13        INIT_FCALL                                               'rtrim'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 '%2C'
         16        DO_ICALL                                         $15     
         17        ASSIGN                                                   !1, $15
   12    18        ASSIGN_OP                                     8          !1, '%5D%2C%3Cbr+%2F%3E'
    5    19      > JMP                                                      ->3
         20    >   FE_FREE                                                  $7
   15    21        INIT_FCALL                                               'rtrim'
         22        SEND_VAR                                                 !1
         23        SEND_VAL                                                 '%2C'
         24        DO_ICALL                                         $18     
         25        ASSIGN                                                   !1, $18
   16    26        ECHO                                                     !1
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.69 ms | 1396 KiB | 15 Q