3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array ( 1 => array ( 'symbol' => 'salad' ), 2 => array ( 'symbol' => 'wine' ), 3 => array ( 'symbol' => 'beer' ) ); $res = ""; $count = count($data); for($i = 1; $i <= $count; $i++) { $res .= $data[$i]["symbol"] . "bar" . ($i !== $count ? ", " : ""); } echo $res;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 6
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 6
Branch analysis from position: 19
Branch analysis from position: 6
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 6
Branch analysis from position: 19
Branch analysis from position: 6
filename:       /in/3J1Yg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $data, !1 = $res, !2 = $count, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, ''
   16     2        COUNT                                            ~6      !0
          3        ASSIGN                                                   !2, ~6
   17     4        ASSIGN                                                   !3, 1
          5      > JMP                                                      ->17
   18     6    >   FETCH_DIM_R                                      ~9      !0, !3
          7        FETCH_DIM_R                                      ~10     ~9, 'symbol'
          8        CONCAT                                           ~11     ~10, 'bar'
          9        IS_NOT_IDENTICAL                                         !3, !2
         10      > JMPZ                                                     ~12, ->13
         11    >   QM_ASSIGN                                        ~13     '%2C+'
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~13     ''
         14    >   CONCAT                                           ~14     ~11, ~13
         15        ASSIGN_OP                                     8          !1, ~14
   17    16        PRE_INC                                                  !3
         17    >   IS_SMALLER_OR_EQUAL                                      !3, !2
         18      > JMPNZ                                                    ~17, ->6
   20    19    >   ECHO                                                     !1
   21    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.48 ms | 1398 KiB | 13 Q