3v4l.org

run code in 300+ PHP versions simultaneously
<?php $renderPyramid = function ($height) { $baseWidth = $height * 2 - 1; for ($i = 1; $i <= $height; $i++) { $spaces = str_pad('', $baseWidth - $i, ' '); $dots = str_pad('', $i * 2 - 1, '.'); echo $spaces . $dots . PHP_EOL; } }; $renderPyramid(4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6jv7s
function name:  (null)
number of ops:  6
compiled vars:  !0 = $renderPyramid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          1        ASSIGN                                                   !0, ~1
   13     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_VAL_EX                                              4
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 6
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 6
Branch analysis from position: 27
Branch analysis from position: 6
filename:       /in/6jv7s
function name:  {closure}
number of ops:  28
compiled vars:  !0 = $height, !1 = $baseWidth, !2 = $i, !3 = $spaces, !4 = $dots
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        MUL                                              ~5      !0, 2
          2        SUB                                              ~6      ~5, 1
          3        ASSIGN                                                   !1, ~6
    5     4        ASSIGN                                                   !2, 1
          5      > JMP                                                      ->25
    6     6    >   INIT_FCALL                                               'str_pad'
          7        SEND_VAL                                                 ''
          8        SUB                                              ~9      !1, !2
          9        SEND_VAL                                                 ~9
         10        SEND_VAL                                                 '+'
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    7    13        INIT_FCALL                                               'str_pad'
         14        SEND_VAL                                                 ''
         15        MUL                                              ~12     !2, 2
         16        SUB                                              ~13     ~12, 1
         17        SEND_VAL                                                 ~13
         18        SEND_VAL                                                 '.'
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !4, $14
    9    21        CONCAT                                           ~16     !3, !4
         22        CONCAT                                           ~17     ~16, '%0A'
         23        ECHO                                                     ~17
    5    24        PRE_INC                                                  !2
         25    >   IS_SMALLER_OR_EQUAL                                      !2, !0
         26      > JMPNZ                                                    ~19, ->6
   11    27    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.74 ms | 1452 KiB | 14 Q