3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cross($h) { $out = ""; for ($i = 0; $i<$h; $i++) { $endPos = $h - $i - 1; $out .= $endPos; for ($j = 0; $j<$h; $j++) { $out .= ($j == $i || $j == $endPos) ? "*" : " "; } $out .= "<br>"; } echo $out; } cross(9); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tNNoq
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'cross'
          1        SEND_VAL                                                 9
          2        DO_FCALL                                      0          
   19     3      > RETURN                                                   1

Function cross:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 4
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 4
Branch analysis from position: 26
Branch analysis from position: 4
Branch analysis from position: 10
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
Branch analysis from position: 10
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
Branch analysis from position: 10
Branch analysis from position: 14
filename:       /in/tNNoq
function name:  cross
number of ops:  28
compiled vars:  !0 = $h, !1 = $out, !2 = $i, !3 = $endPos, !4 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->24
    6     4    >   SUB                                              ~7      !0, !2
          5        SUB                                              ~8      ~7, 1
          6        ASSIGN                                                   !3, ~8
    7     7        ASSIGN_OP                                     8          !1, !3
    8     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->20
   10    10    >   IS_EQUAL                                         ~12     !4, !2
         11      > JMPNZ_EX                                         ~12     ~12, ->14
         12    >   IS_EQUAL                                         ~13     !4, !3
         13        BOOL                                             ~12     ~13
         14    > > JMPZ                                                     ~12, ->17
         15    >   QM_ASSIGN                                        ~14     '%2A'
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~14     '+'
         18    >   ASSIGN_OP                                     8          !1, ~14
    8    19        PRE_INC                                                  !4
         20    >   IS_SMALLER                                               !4, !0
         21      > JMPNZ                                                    ~17, ->10
   12    22    >   ASSIGN_OP                                     8          !1, '%3Cbr%3E'
    4    23        PRE_INC                                                  !2
         24    >   IS_SMALLER                                               !2, !0
         25      > JMPNZ                                                    ~20, ->4
   14    26    >   ECHO                                                     !1
   15    27      > RETURN                                                   null

End of function cross

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.61 ms | 1403 KiB | 14 Q