3v4l.org

run code in 300+ PHP versions simultaneously
<?php function printLines($i, $lines = [], $newline = PHP_EOL) { if ($i > 0) { array_unshift( $lines, str_repeat('*', $i * .5 * ($i + 1)) . str_repeat('0', $i - 1) ); printLines(--$i, $lines); } else { echo implode($newline, $lines); } } printLines(5);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/02pSu
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'printlines'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function printlines:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 28
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/02pSu
function name:  printLines
number of ops:  34
compiled vars:  !0 = $i, !1 = $lines, !2 = $newline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
          2        RECV_INIT                                        !2      <const ast>
    4     3        IS_SMALLER                                               0, !0
          4      > JMPZ                                                     ~3, ->28
    5     5    >   INIT_FCALL                                               'array_unshift'
    6     6        SEND_REF                                                 !1
    7     7        INIT_FCALL                                               'str_repeat'
          8        SEND_VAL                                                 '%2A'
          9        MUL                                              ~4      !0, 0.5
         10        ADD                                              ~5      !0, 1
         11        MUL                                              ~6      ~4, ~5
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                         $7      
    8    14        INIT_FCALL                                               'str_repeat'
         15        SEND_VAL                                                 '0'
         16        SUB                                              ~8      !0, 1
         17        SEND_VAL                                                 ~8
         18        DO_ICALL                                         $9      
         19        CONCAT                                           ~10     $7, $9
         20        SEND_VAL                                                 ~10
    5    21        DO_ICALL                                                 
   10    22        INIT_FCALL_BY_NAME                                       'printLines'
         23        PRE_DEC                                          ~12     !0
         24        SEND_VAL_EX                                              ~12
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0          
    4    27      > JMP                                                      ->33
   12    28    >   INIT_FCALL                                               'implode'
         29        SEND_VAR                                                 !2
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $14     
         32        ECHO                                                     $14
   14    33    > > RETURN                                                   null

End of function printlines

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.21 ms | 1007 KiB | 17 Q