3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create_pyramid($limit) { for($row = 1; $row < $limit; $row ++) { $stars = str_repeat('*', ($row - 1) * 2 + 1); $space = str_repeat(' ', $limit - $row); echo $space . $stars . '<br/>'; } } echo "<pre>" ; create_pyramid(10);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PbURm
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     '%3Cpre%3E'
   11     1        INIT_FCALL                                               'create_pyramid'
          2        SEND_VAL                                                 10
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function create_pyramid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
Branch analysis from position: 3
filename:       /in/PbURm
function name:  create_pyramid
number of ops:  24
compiled vars:  !0 = $limit, !1 = $row, !2 = $stars, !3 = $space
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->21
    5     3    >   INIT_FCALL                                               'str_repeat'
          4        SEND_VAL                                                 '%2A'
          5        SUB                                              ~5      !1, 1
          6        MUL                                              ~6      ~5, 2
          7        ADD                                              ~7      ~6, 1
          8        SEND_VAL                                                 ~7
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    6    11        INIT_FCALL                                               'str_repeat'
         12        SEND_VAL                                                 '+'
         13        SUB                                              ~10     !0, !1
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !3, $11
    7    17        CONCAT                                           ~13     !3, !2
         18        CONCAT                                           ~14     ~13, '%3Cbr%2F%3E'
         19        ECHO                                                     ~14
    4    20        PRE_INC                                                  !1
         21    >   IS_SMALLER                                               !1, !0
         22      > JMPNZ                                                    ~16, ->3
    9    23    > > RETURN                                                   null

End of function create_pyramid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.61 ms | 946 KiB | 17 Q