3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.72 ms | 1405 KiB | 25 Q