3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array[0][0] = "a"; $array[0][1] = "b"; $array[0][2] = "c"; //1 echo implode(",", $array[0]); //2 echo implode(",", array_map(function($v){ return implode(",", $v); }, $array)); //3 $it = new RecursiveArrayIterator($array); foreach ($it as $v) echo $v; //4 array_walk_recursive($array, function($v, $k){ echo $v . "<br>"; }); //5 foreach($array[0] as $v) echo $v; //6 foreach($array as $ia){ foreach($ia as $v) echo $v; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 33
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 33
2 jumps found. (Code = 77) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
2 jumps found. (Code = 78) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 44
2 jumps found. (Code = 77) Position 1 = 46, Position 2 = 53
Branch analysis from position: 46
2 jumps found. (Code = 78) Position 1 = 47, Position 2 = 53
Branch analysis from position: 47
2 jumps found. (Code = 77) Position 1 = 48, Position 2 = 51
Branch analysis from position: 48
2 jumps found. (Code = 78) Position 1 = 49, Position 2 = 51
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 51
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
Branch analysis from position: 44
Branch analysis from position: 33
filename:       /in/WOG6s
function name:  (null)
number of ops:  55
compiled vars:  !0 = $array, !1 = $it, !2 = $v, !3 = $ia
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_DIM_W                                      $4      !0, 0
          1        ASSIGN_DIM                                               $4, 0
          2        OP_DATA                                                  'a'
    4     3        FETCH_DIM_W                                      $6      !0, 0
          4        ASSIGN_DIM                                               $6, 1
          5        OP_DATA                                                  'b'
    5     6        FETCH_DIM_W                                      $8      !0, 0
          7        ASSIGN_DIM                                               $8, 2
          8        OP_DATA                                                  'c'
    9     9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 '%2C'
         11        FETCH_DIM_R                                      ~10     !0, 0
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                         $11     
         14        ECHO                                                     $11
   12    15        INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '%2C'
         17        INIT_FCALL                                               'array_map'
         18        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWOG6s%3A12%240'
   14    19        SEND_VAL                                                 ~12
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                         $14     
         24        ECHO                                                     $14
   17    25        NEW                                              $15     'RecursiveArrayIterator'
         26        SEND_VAR_EX                                              !0
         27        DO_FCALL                                      0          
         28        ASSIGN                                                   !1, $15
   19    29      > FE_RESET_R                                       $18     !1, ->33
         30    > > FE_FETCH_R                                               $18, !2, ->33
   20    31    >   ECHO                                                     !2
   19    32      > JMP                                                      ->30
         33    >   FE_FREE                                                  $18
   23    34        INIT_FCALL                                               'array_walk_recursive'
         35        SEND_REF                                                 !0
         36        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWOG6s%3A23%241'
   25    37        SEND_VAL                                                 ~19
         38        DO_ICALL                                                 
   28    39        FETCH_DIM_R                                      ~21     !0, 0
         40      > FE_RESET_R                                       $22     ~21, ->44
         41    > > FE_FETCH_R                                               $22, !2, ->44
   29    42    >   ECHO                                                     !2
   28    43      > JMP                                                      ->41
         44    >   FE_FREE                                                  $22
   32    45      > FE_RESET_R                                       $23     !0, ->53
         46    > > FE_FETCH_R                                               $23, !3, ->53
   33    47    > > FE_RESET_R                                       $24     !3, ->51
         48    > > FE_FETCH_R                                               $24, !2, ->51
   34    49    >   ECHO                                                     !2
   33    50      > JMP                                                      ->48
         51    >   FE_FREE                                                  $24
   32    52      > JMP                                                      ->46
         53    >   FE_FREE                                                  $23
   35    54      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWOG6s%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOG6s
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   14     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWOG6s%3A12%240

Function %00%7Bclosure%7D%2Fin%2FWOG6s%3A23%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOG6s
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2        CONCAT                                           ~2      !0, '%3Cbr%3E'
          3        ECHO                                                     ~2
   25     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWOG6s%3A23%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
197.75 ms | 1404 KiB | 19 Q