3v4l.org

run code in 300+ PHP versions simultaneously
<?php $radius = 3; $blank = ' '; for ($i = 1, $diameter = $radius * 2 - 1; $i <= $diameter; $i++) { $nums = range(1, $i); $nums = array_merge($nums, array_reverse(array_slice($nums, 0, -1))); $blanks = array_fill(0, $diameter - $i, $blank); $row = array_merge($blanks, $nums, $blanks); echo join($row); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 7
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 7
Branch analysis from position: 45
Branch analysis from position: 7
filename:       /in/6n08d
function name:  (null)
number of ops:  46
compiled vars:  !0 = $radius, !1 = $blank, !2 = $i, !3 = $diameter, !4 = $nums, !5 = $blanks, !6 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 3
    4     1        ASSIGN                                                   !1, '+'
    6     2        ASSIGN                                                   !2, 1
          3        MUL                                              ~10     !0, 2
          4        SUB                                              ~11     ~10, 1
          5        ASSIGN                                                   !3, ~11
          6      > JMP                                                      ->43
    7     7    >   INIT_FCALL                                               'range'
          8        SEND_VAL                                                 1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $13     
         11        ASSIGN                                                   !4, $13
    8    12        INIT_FCALL                                               'array_merge'
         13        SEND_VAR                                                 !4
         14        INIT_FCALL                                               'array_reverse'
         15        INIT_FCALL                                               'array_slice'
         16        SEND_VAR                                                 !4
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 -1
         19        DO_ICALL                                         $15     
         20        SEND_VAR                                                 $15
         21        DO_ICALL                                         $16     
         22        SEND_VAR                                                 $16
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !4, $17
    9    25        INIT_FCALL                                               'array_fill'
         26        SEND_VAL                                                 0
         27        SUB                                              ~19     !3, !2
         28        SEND_VAL                                                 ~19
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $20     
         31        ASSIGN                                                   !5, $20
   10    32        INIT_FCALL                                               'array_merge'
         33        SEND_VAR                                                 !5
         34        SEND_VAR                                                 !4
         35        SEND_VAR                                                 !5
         36        DO_ICALL                                         $22     
         37        ASSIGN                                                   !6, $22
   12    38        INIT_FCALL                                               'join'
         39        SEND_VAR                                                 !6
         40        DO_ICALL                                         $24     
         41        ECHO                                                     $24
    6    42        PRE_INC                                                  !2
         43    >   IS_SMALLER_OR_EQUAL                                      !2, !3
         44      > JMPNZ                                                    ~26, ->7
   13    45    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.28 ms | 1405 KiB | 25 Q