3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = isset($argv[1]) && $argv[1] >= 8 && $argv[1] <= 90 ? $argv[1] : 12; $a = ""; for ($i = 1; $i < $iterations; $i++) { $a .= str_pad("", $iterations-$i-1); for ($j = 0; $j < ($i * 2)-1; $j++) { $a .= $i == 1 ? ("\033[0;33m*\033[0;32m") : (mt_rand(0, 100 / ($i < 6 ? 5 : $i)) == 1 ? ("\033[0;3" . mt_rand(1, 6) . "mo\033[0;32m") : ("^")); $a .= "\n"; } $a .= "\033[0;33m" . str_repeat(str_pad("", $iterations-($iterations / 5)) . str_repeat(".", ($iterations/5)) . "\n", ($iterations/8))."\033[0m"; } print $a;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 82
Branch analysis from position: 82
2 jumps found. (Code = 44) Position 1 = 84, Position 2 = 18
Branch analysis from position: 84
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 27
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 84, Position 2 = 18
Branch analysis from position: 84
Branch analysis from position: 18
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 27
Branch analysis from position: 60
Branch analysis from position: 27
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 51
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 27
Branch analysis from position: 60
Branch analysis from position: 27
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 27
Branch analysis from position: 60
Branch analysis from position: 27
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 51
Branch analysis from position: 43
Branch analysis from position: 51
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 82
Branch analysis from position: 82
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/sPpPf
function name:  (null)
number of ops:  86
compiled vars:  !0 = $iterations, !1 = $argv, !2 = $a, !3 = $i, !4 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ISSET_ISEMPTY_DIM_OBJ                         0  ~5      !1, 1
          1      > JMPZ_EX                                          ~5      ~5, ->5
          2    >   FETCH_DIM_R                                      ~6      !1, 1
          3        IS_SMALLER_OR_EQUAL                              ~7      8, ~6
          4        BOOL                                             ~5      ~7
          5    > > JMPZ_EX                                          ~5      ~5, ->9
          6    >   FETCH_DIM_R                                      ~8      !1, 1
          7        IS_SMALLER_OR_EQUAL                              ~9      ~8, 90
          8        BOOL                                             ~5      ~9
          9    > > JMPZ                                                     ~5, ->13
         10    >   FETCH_DIM_R                                      ~10     !1, 1
         11        QM_ASSIGN                                        ~11     ~10
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~11     12
         14    >   ASSIGN                                                   !0, ~11
    3    15        ASSIGN                                                   !2, ''
    4    16        ASSIGN                                                   !3, 1
         17      > JMP                                                      ->82
    5    18    >   INIT_FCALL                                               'str_pad'
         19        SEND_VAL                                                 ''
         20        SUB                                              ~15     !0, !3
         21        SUB                                              ~16     ~15, 1
         22        SEND_VAL                                                 ~16
         23        DO_ICALL                                         $17     
         24        ASSIGN_OP                                     8          !2, $17
    6    25        ASSIGN                                                   !4, 0
         26      > JMP                                                      ->56
    7    27    >   IS_EQUAL                                                 !3, 1
         28      > JMPZ                                                     ~20, ->31
         29    >   QM_ASSIGN                                        ~21     '%1B%5B0%3B33m%2A%1B%5B0%3B32m'
         30      > JMP                                                      ->53
         31    >   INIT_FCALL                                               'mt_rand'
         32        SEND_VAL                                                 0
         33        IS_SMALLER                                               !3, 6
         34      > JMPZ                                                     ~22, ->37
         35    >   QM_ASSIGN                                        ~23     5
         36      > JMP                                                      ->38
         37    >   QM_ASSIGN                                        ~23     !3
         38    >   DIV                                              ~24     100, ~23
         39        SEND_VAL                                                 ~24
         40        DO_ICALL                                         $25     
         41        IS_EQUAL                                                 $25, 1
         42      > JMPZ                                                     ~26, ->51
         43    >   INIT_FCALL                                               'mt_rand'
         44        SEND_VAL                                                 1
         45        SEND_VAL                                                 6
         46        DO_ICALL                                         $27     
         47        CONCAT                                           ~28     '%1B%5B0%3B3', $27
         48        CONCAT                                           ~29     ~28, 'mo%1B%5B0%3B32m'
         49        QM_ASSIGN                                        ~30     ~29
         50      > JMP                                                      ->52
         51    >   QM_ASSIGN                                        ~30     '%5E'
         52    >   QM_ASSIGN                                        ~21     ~30
         53    >   ASSIGN_OP                                     8          !2, ~21
    8    54        ASSIGN_OP                                     8          !2, '%0A'
    6    55        PRE_INC                                                  !4
         56    >   MUL                                              ~34     !3, 2
         57        SUB                                              ~35     ~34, 1
         58        IS_SMALLER                                               !4, ~35
         59      > JMPNZ                                                    ~36, ->27
   11    60    >   INIT_FCALL                                               'str_repeat'
         61        INIT_FCALL                                               'str_pad'
         62        SEND_VAL                                                 ''
         63        DIV                                              ~37     !0, 5
         64        SUB                                              ~38     !0, ~37
         65        SEND_VAL                                                 ~38
         66        DO_ICALL                                         $39     
         67        INIT_FCALL                                               'str_repeat'
         68        SEND_VAL                                                 '.'
         69        DIV                                              ~40     !0, 5
         70        SEND_VAL                                                 ~40
         71        DO_ICALL                                         $41     
         72        CONCAT                                           ~42     $39, $41
         73        CONCAT                                           ~43     ~42, '%0A'
         74        SEND_VAL                                                 ~43
         75        DIV                                              ~44     !0, 8
         76        SEND_VAL                                                 ~44
         77        DO_ICALL                                         $45     
         78        CONCAT                                           ~46     '%1B%5B0%3B33m', $45
         79        CONCAT                                           ~47     ~46, '%1B%5B0m'
         80        ASSIGN_OP                                     8          !2, ~47
    4    81        PRE_INC                                                  !3
         82    >   IS_SMALLER                                               !3, !0
         83      > JMPNZ                                                    ~50, ->18
   14    84    >   ECHO                                                     !2
         85      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.62 ms | 1404 KiB | 19 Q