3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = [3,4,5]; $html = ''; $count = 0; foreach ($x as $y) { $count ++; $html .= 'y = ' . $y ."\n"; } echo 'Count :' . $count . "\n"; echo $html;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/K5kN6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x, !1 = $html, !2 = $count, !3 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
    5     3      > FE_RESET_R                                       $7      !0, ->10
          4    > > FE_FETCH_R                                               $7, !3, ->10
    7     5    >   PRE_INC                                                  !2
    8     6        CONCAT                                           ~9      'y+%3D+', !3
          7        CONCAT                                           ~10     ~9, '%0A'
          8        ASSIGN_OP                                     8          !1, ~10
    5     9      > JMP                                                      ->4
         10    >   FE_FREE                                                  $7
   11    11        CONCAT                                           ~12     'Count+%3A', !2
         12        CONCAT                                           ~13     ~12, '%0A'
         13        ECHO                                                     ~13
   12    14        ECHO                                                     !1
   13    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.55 ms | 1393 KiB | 13 Q