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 = 40
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 40
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
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/ut7Br
function name:  (null)
number of ops:  47
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, ->40
         20    > > FE_FETCH_R                                               $17, !4, ->40
   21    21    >   INIT_FCALL                                               'implode'
         22        INIT_FCALL                                               'array_values'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                         $18     
         25        SEND_VAR                                                 $18
         26        SEND_VAL                                                 '%2C'
         27        DO_ICALL                                         $19     
         28        ECHO                                                     $19
   22    29        CONCAT                                           ~20     !3, '%2C'
         30        INIT_FCALL                                               'implode'
         31        INIT_FCALL                                               'array_values'
         32        SEND_VAR                                                 !4
         33        DO_ICALL                                         $21     
         34        SEND_VAR                                                 $21
         35        SEND_VAL                                                 '%2C'
         36        DO_ICALL                                         $22     
         37        CONCAT                                           ~23     ~20, $22
         38        ASSIGN                                                   !3, ~23
   19    39      > JMP                                                      ->20
         40    >   FE_FREE                                                  $17
   25    41        INIT_FCALL                                               'ltrim'
         42        SEND_VAR                                                 !3
         43        DO_ICALL                                         $25     
         44        ASSIGN                                                   !3, $25
   26    45        ECHO                                                     !3
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.98 ms | 1405 KiB | 19 Q