3v4l.org

run code in 500+ PHP versions simultaneously
<?php const LINES = 10; for ($rows = 0; $rows <= LINES; $rows++) { for ($spaces = LINES; $spaces >= $rows; $spaces--) { echo "+"; } for ($stars = 0; $stars <= $rows; $stars++) { echo '#'; } for ($stars = 0; $stars <= $rows; $stars++) { echo '#'; } for ($spaces = LINES; $spaces >= $rows; $spaces--) { echo "+"; } echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 3
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 6
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 12
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 18
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 25
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 3
Branch analysis from position: 34
Branch analysis from position: 3
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 25
Branch analysis from position: 29
Branch analysis from position: 25
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 18
Branch analysis from position: 22
Branch analysis from position: 18
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 12
Branch analysis from position: 16
Branch analysis from position: 12
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 6
Branch analysis from position: 10
Branch analysis from position: 6
filename:       /in/E1oqK
function name:  (null)
number of ops:  35
compiled vars:  !0 = $rows, !1 = $spaces, !2 = $stars
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                                'LINES', 10
    5     1        ASSIGN                                                       !0, 0
          2      > JMP                                                          ->31
    6     3    >   FETCH_CONSTANT                                       ~4      'LINES'
          4        ASSIGN                                                       !1, ~4
          5      > JMP                                                          ->8
    7     6    >   ECHO                                                         '%2B'
    6     7        PRE_DEC                                                      !1
          8    >   IS_SMALLER_OR_EQUAL                                          !0, !1
          9      > JMPNZ                                                        ~7, ->6
    9    10    >   ASSIGN                                                       !2, 0
         11      > JMP                                                          ->14
   10    12    >   ECHO                                                         '%23'
    9    13        PRE_INC                                                      !2
         14    >   IS_SMALLER_OR_EQUAL                                          !2, !0
         15      > JMPNZ                                                        ~10, ->12
   12    16    >   ASSIGN                                                       !2, 0
         17      > JMP                                                          ->20
   13    18    >   ECHO                                                         '%23'
   12    19        PRE_INC                                                      !2
         20    >   IS_SMALLER_OR_EQUAL                                          !2, !0
         21      > JMPNZ                                                        ~13, ->18
   15    22    >   FETCH_CONSTANT                                       ~14     'LINES'
         23        ASSIGN                                                       !1, ~14
         24      > JMP                                                          ->27
   16    25    >   ECHO                                                         '%2B'
   15    26        PRE_DEC                                                      !1
         27    >   IS_SMALLER_OR_EQUAL                                          !0, !1
         28      > JMPNZ                                                        ~17, ->25
   18    29    >   ECHO                                                         '%0A'
    5    30        PRE_INC                                                      !0
         31    >   FETCH_CONSTANT                                       ~19     'LINES'
         32        IS_SMALLER_OR_EQUAL                                          !0, ~19
         33      > JMPNZ                                                        ~20, ->3
   19    34    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
133.85 ms | 2082 KiB | 13 Q