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 = ''; $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 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/D0qfM
function name:  (null)
number of ops:  29
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, ->21
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->21
          4    >   ASSIGN                                                   !3, ~8
    7     5        ASSIGN                                                   !1, ''
    8     6        CONCAT                                           ~11     !3, '%3D%3E%5B'
          7        ASSIGN_OP                                     8          !1, ~11
    9     8      > FE_RESET_R                                       $13     !2, ->13
          9    > > FE_FETCH_R                                               $13, !4, ->13
   10    10    >   CONCAT                                           ~14     !4, '%2C'
         11        ASSIGN_OP                                     8          !1, ~14
    9    12      > JMP                                                      ->9
         13    >   FE_FREE                                                  $13
   12    14        INIT_FCALL                                               'rtrim'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 '%2C'
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !1, $16
   13    19        ASSIGN_OP                                     8          !1, '%5D%2C%3Cbr+%2F%3E'
    5    20      > JMP                                                      ->3
         21    >   FE_FREE                                                  $7
   16    22        INIT_FCALL                                               'rtrim'
         23        SEND_VAR                                                 !1
         24        SEND_VAL                                                 '%2C'
         25        DO_ICALL                                         $19     
         26        ASSIGN                                                   !1, $19
   17    27        ECHO                                                     !1
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.69 ms | 1396 KiB | 15 Q