3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<pre>\n"; $n=4; $max_length = $n * 2 - 1; for ($i = 1; $i <= $n * 2 - 1; $i++) { $this_n = ($i <= $n) ? $i : $n * 2 - $i; $num_ns = $this_n * 2 - 1; echo str_repeat(' ', ($max_length - $num_ns) / 2); echo str_repeat("$this_n", $num_ns); echo "\n"; } echo '</pre>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
Branch analysis from position: 7
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
Branch analysis from position: 7
filename:       /in/UMQIe
function name:  (null)
number of ops:  39
compiled vars:  !0 = $n, !1 = $max_length, !2 = $i, !3 = $this_n, !4 = $num_ns
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%3Cpre%3E%0A'
    4     1        ASSIGN                                                   !0, 4
    5     2        MUL                                              ~6      !0, 2
          3        SUB                                              ~7      ~6, 1
          4        ASSIGN                                                   !1, ~7
    6     5        ASSIGN                                                   !2, 1
          6      > JMP                                                      ->33
    7     7    >   IS_SMALLER_OR_EQUAL                                      !2, !0
          8      > JMPZ                                                     ~10, ->11
          9    >   QM_ASSIGN                                        ~11     !2
         10      > JMP                                                      ->14
         11    >   MUL                                              ~12     !0, 2
         12        SUB                                              ~13     ~12, !2
         13        QM_ASSIGN                                        ~11     ~13
         14    >   ASSIGN                                                   !3, ~11
    8    15        MUL                                              ~15     !3, 2
         16        SUB                                              ~16     ~15, 1
         17        ASSIGN                                                   !4, ~16
    9    18        INIT_FCALL                                               'str_repeat'
         19        SEND_VAL                                                 '+'
         20        SUB                                              ~18     !1, !4
         21        DIV                                              ~19     ~18, 2
         22        SEND_VAL                                                 ~19
         23        DO_ICALL                                         $20     
         24        ECHO                                                     $20
   10    25        INIT_FCALL                                               'str_repeat'
         26        CAST                                          6  ~21     !3
         27        SEND_VAL                                                 ~21
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                         $22     
         30        ECHO                                                     $22
   11    31        ECHO                                                     '%0A'
    6    32        PRE_INC                                                  !2
         33    >   MUL                                              ~24     !0, 2
         34        SUB                                              ~25     ~24, 1
         35        IS_SMALLER_OR_EQUAL                                      !2, ~25
         36      > JMPNZ                                                    ~26, ->7
   13    37    >   ECHO                                                     '%3C%2Fpre%3E'
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.76 ms | 949 KiB | 14 Q