3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(1,2,3,4); $total = count($numbers); $sum = 0; $output = ""; $i = 0; foreach($numbers as $number) { $i = $i + 1; if ($i < $total) { $output = $number . $output; } } echo $output; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/LgElM
function name:  (null)
number of ops:  18
compiled vars:  !0 = $numbers, !1 = $total, !2 = $sum, !3 = $output, !4 = $i, !5 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        COUNT                                            ~7      !0
          2        ASSIGN                                                   !1, ~7
    7     3        ASSIGN                                                   !2, 0
    9     4        ASSIGN                                                   !3, ''
   11     5        ASSIGN                                                   !4, 0
   13     6      > FE_RESET_R                                       $12     !0, ->15
          7    > > FE_FETCH_R                                               $12, !5, ->15
   15     8    >   ADD                                              ~13     !4, 1
          9        ASSIGN                                                   !4, ~13
   17    10        IS_SMALLER                                               !4, !1
         11      > JMPZ                                                     ~15, ->14
   19    12    >   CONCAT                                           ~16     !5, !3
         13        ASSIGN                                                   !3, ~16
   13    14    > > JMP                                                      ->7
         15    >   FE_FREE                                                  $12
   25    16        ECHO                                                     !3
   27    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.48 ms | 1393 KiB | 13 Q