3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ctr = 0; while ($ctr < 7) { $RespondentsResultSetArray[$ctr] = array( "Firstname" => "sample", "Lastname" => "name" ); $ctr = $ctr + 1; } foreach ($RespondentsResultSetArray as $key) { echo $key["Firstname"] . ' ' . $key["Lastname"] . ', '; } $string = ""; foreach($RespondentsResultSetArray as $values) { //echo implode(array_values($values),","); $string= $string.",".implode(array_values($values),","); } $string=ltrim($string,","); echo $string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 32
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 32
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 17
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/vS9N9
function name:  (null)
number of ops:  40
compiled vars:  !0 = $ctr, !1 = $RespondentsResultSetArray, !2 = $key, !3 = $string, !4 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1      > JMP                                                      ->6
    5     2    >   ASSIGN_DIM                                               !1, !0
    6     3        OP_DATA                                                  <array>
   10     4        ADD                                              ~7      !0, 1
          5        ASSIGN                                                   !0, ~7
    3     6    >   IS_SMALLER                                               !0, 7
          7      > JMPNZ                                                    ~9, ->2
   13     8    > > FE_RESET_R                                       $10     !1, ->17
          9    > > FE_FETCH_R                                               $10, !2, ->17
   14    10    >   FETCH_DIM_R                                      ~11     !2, 'Firstname'
         11        CONCAT                                           ~12     ~11, '+'
         12        FETCH_DIM_R                                      ~13     !2, 'Lastname'
         13        CONCAT                                           ~14     ~12, ~13
         14        CONCAT                                           ~15     ~14, '%2C+'
         15        ECHO                                                     ~15
   13    16      > JMP                                                      ->9
         17    >   FE_FREE                                                  $10
   18    18        ASSIGN                                                   !3, ''
   19    19      > FE_RESET_R                                       $17     !1, ->32
         20    > > FE_FETCH_R                                               $17, !4, ->32
   22    21    >   CONCAT                                           ~18     !3, '%2C'
         22        INIT_FCALL                                               'implode'
         23        INIT_FCALL                                               'array_values'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $19     
         26        SEND_VAR                                                 $19
         27        SEND_VAL                                                 '%2C'
         28        DO_ICALL                                         $20     
         29        CONCAT                                           ~21     ~18, $20
         30        ASSIGN                                                   !3, ~21
   19    31      > JMP                                                      ->20
         32    >   FE_FREE                                                  $17
   25    33        INIT_FCALL                                               'ltrim'
         34        SEND_VAR                                                 !3
         35        SEND_VAL                                                 '%2C'
         36        DO_ICALL                                         $23     
         37        ASSIGN                                                   !3, $23
   26    38        ECHO                                                     !3
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.9 ms | 1392 KiB | 19 Q