3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); mb_internal_encoding("utf-8"); $phrase = "ПРИВЕТЛИЛИЧКА"; $phraseLenght = mb_strlen($phrase); //$fromAngle = -80; //$toAngle = 260; $radius = 12.5; $height = 30; $centerX = 40; $centerY = 15; $screen = array(); for ($y=0; $y < $height; $y++) { $screen[$y] = array_fill(0, 80, " "); } $degree = round(360/$phraseLenght); for($i = 0, $curDegree = $degree; $i < $phraseLenght; $i++, $curDegree += $degree){ $x = floor($radius * sin(deg2rad($curDegree))) * 2; $y = floor($radius * cos(deg2rad($curDegree))); if ($x >= 0 and $y >= 0) { $screen[$centerY - $y][$centerX + $x] = mb_substr($phrase, $i, 1); } elseif ($x >= 0 and $y <= 0) { $screen[$centerY + abs($y)][$centerX + $x] = mb_substr($phrase, $i, 1); } elseif ($x <= 0 and $y <= 0) { $screen[$centerY + abs($y)][$centerX - abs($x)] = mb_substr($phrase, $i, 1); } elseif ($x <= 0 and $y >= 0) { $screen[$centerY - $y][$centerX - abs($x)] = mb_substr($phrase, $i, 1); } } foreach ($screen as $row) { foreach ($row as $value) { echo "$value"; } echo "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 18
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
2 jumps found. (Code = 44) Position 1 = 138, Position 2 = 36
Branch analysis from position: 138
2 jumps found. (Code = 77) Position 1 = 139, Position 2 = 148
Branch analysis from position: 139
2 jumps found. (Code = 78) Position 1 = 140, Position 2 = 148
Branch analysis from position: 140
2 jumps found. (Code = 77) Position 1 = 141, Position 2 = 145
Branch analysis from position: 141
2 jumps found. (Code = 78) Position 1 = 142, Position 2 = 145
Branch analysis from position: 142
1 jumps found. (Code = 42) Position 1 = 141
Branch analysis from position: 141
Branch analysis from position: 145
1 jumps found. (Code = 42) Position 1 = 139
Branch analysis from position: 139
Branch analysis from position: 145
Branch analysis from position: 148
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 148
Branch analysis from position: 36
2 jumps found. (Code = 46) Position 1 = 61, Position 2 = 63
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 75
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 134
Branch analysis from position: 134
2 jumps found. (Code = 44) Position 1 = 138, Position 2 = 36
Branch analysis from position: 138
Branch analysis from position: 36
Branch analysis from position: 75
2 jumps found. (Code = 46) Position 1 = 77, Position 2 = 79
Branch analysis from position: 77
2 jumps found. (Code = 43) Position 1 = 80, Position 2 = 94
Branch analysis from position: 80
1 jumps found. (Code = 42) Position 1 = 134
Branch analysis from position: 134
Branch analysis from position: 94
2 jumps found. (Code = 46) Position 1 = 96, Position 2 = 98
Branch analysis from position: 96
2 jumps found. (Code = 43) Position 1 = 99, Position 2 = 116
Branch analysis from position: 99
1 jumps found. (Code = 42) Position 1 = 134
Branch analysis from position: 134
Branch analysis from position: 116
2 jumps found. (Code = 46) Position 1 = 118, Position 2 = 120
Branch analysis from position: 118
2 jumps found. (Code = 43) Position 1 = 121, Position 2 = 134
Branch analysis from position: 121
2 jumps found. (Code = 44) Position 1 = 138, Position 2 = 36
Branch analysis from position: 138
Branch analysis from position: 36
Branch analysis from position: 134
Branch analysis from position: 120
Branch analysis from position: 98
Branch analysis from position: 79
Branch analysis from position: 63
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 18
Branch analysis from position: 28
Branch analysis from position: 18
filename:       /in/BAtH4
function name:  (null)
number of ops:  150
compiled vars:  !0 = $phrase, !1 = $phraseLenght, !2 = $radius, !3 = $height, !4 = $centerX, !5 = $centerY, !6 = $screen, !7 = $y, !8 = $degree, !9 = $i, !10 = $curDegree, !11 = $x, !12 = $row, !13 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'mb_internal_encoding'
          4        SEND_VAL                                                 'utf-8'
          5        DO_ICALL                                                 
    6     6        ASSIGN                                                   !0, '%D0%9F%D0%A0%D0%98%D0%92%D0%95%D0%A2%D0%9B%D0%98%D0%9B%D0%98%D0%A7%D0%9A%D0%90'
    7     7        INIT_FCALL                                               'mb_strlen'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $17     
         10        ASSIGN                                                   !1, $17
   11    11        ASSIGN                                                   !2, 12.5
   13    12        ASSIGN                                                   !3, 30
   14    13        ASSIGN                                                   !4, 40
   15    14        ASSIGN                                                   !5, 15
   17    15        ASSIGN                                                   !6, <array>
   19    16        ASSIGN                                                   !7, 0
         17      > JMP                                                      ->26
   20    18    >   INIT_FCALL                                               'array_fill'
         19        SEND_VAL                                                 0
         20        SEND_VAL                                                 80
         21        SEND_VAL                                                 '+'
         22        DO_ICALL                                         $26     
         23        ASSIGN_DIM                                               !6, !7
         24        OP_DATA                                                  $26
   19    25        PRE_INC                                                  !7
         26    >   IS_SMALLER                                               !7, !3
         27      > JMPNZ                                                    ~28, ->18
   23    28    >   INIT_FCALL                                               'round'
         29        DIV                                              ~29     360, !1
         30        SEND_VAL                                                 ~29
         31        DO_ICALL                                         $30     
         32        ASSIGN                                                   !8, $30
   25    33        ASSIGN                                                   !9, 0
         34        ASSIGN                                                   !10, !8
         35      > JMP                                                      ->136
   26    36    >   INIT_FCALL                                               'floor'
         37        INIT_FCALL                                               'sin'
         38        INIT_FCALL                                               'deg2rad'
         39        SEND_VAR                                                 !10
         40        DO_ICALL                                         $34     
         41        SEND_VAR                                                 $34
         42        DO_ICALL                                         $35     
         43        MUL                                              ~36     !2, $35
         44        SEND_VAL                                                 ~36
         45        DO_ICALL                                         $37     
         46        MUL                                              ~38     $37, 2
         47        ASSIGN                                                   !11, ~38
   27    48        INIT_FCALL                                               'floor'
         49        INIT_FCALL                                               'cos'
         50        INIT_FCALL                                               'deg2rad'
         51        SEND_VAR                                                 !10
         52        DO_ICALL                                         $40     
         53        SEND_VAR                                                 $40
         54        DO_ICALL                                         $41     
         55        MUL                                              ~42     !2, $41
         56        SEND_VAL                                                 ~42
         57        DO_ICALL                                         $43     
         58        ASSIGN                                                   !7, $43
   28    59        IS_SMALLER_OR_EQUAL                              ~45     0, !11
         60      > JMPZ_EX                                          ~45     ~45, ->63
         61    >   IS_SMALLER_OR_EQUAL                              ~46     0, !7
         62        BOOL                                             ~45     ~46
         63    > > JMPZ                                                     ~45, ->75
   29    64    >   SUB                                              ~47     !5, !7
         65        ADD                                              ~49     !4, !11
         66        INIT_FCALL                                               'mb_substr'
         67        SEND_VAR                                                 !0
         68        SEND_VAR                                                 !9
         69        SEND_VAL                                                 1
         70        DO_ICALL                                         $51     
         71        FETCH_DIM_W                                      $48     !6, ~47
         72        ASSIGN_DIM                                               $48, ~49
         73        OP_DATA                                                  $51
         74      > JMP                                                      ->134
   30    75    >   IS_SMALLER_OR_EQUAL                              ~52     0, !11
         76      > JMPZ_EX                                          ~52     ~52, ->79
         77    >   IS_SMALLER_OR_EQUAL                              ~53     !7, 0
         78        BOOL                                             ~52     ~53
         79    > > JMPZ                                                     ~52, ->94
   31    80    >   INIT_FCALL                                               'abs'
         81        SEND_VAR                                                 !7
         82        DO_ICALL                                         $54     
         83        ADD                                              ~55     !5, $54
         84        ADD                                              ~57     !4, !11
         85        INIT_FCALL                                               'mb_substr'
         86        SEND_VAR                                                 !0
         87        SEND_VAR                                                 !9
         88        SEND_VAL                                                 1
         89        DO_ICALL                                         $59     
         90        FETCH_DIM_W                                      $56     !6, ~55
         91        ASSIGN_DIM                                               $56, ~57
         92        OP_DATA                                                  $59
         93      > JMP                                                      ->134
   32    94    >   IS_SMALLER_OR_EQUAL                              ~60     !11, 0
         95      > JMPZ_EX                                          ~60     ~60, ->98
         96    >   IS_SMALLER_OR_EQUAL                              ~61     !7, 0
         97        BOOL                                             ~60     ~61
         98    > > JMPZ                                                     ~60, ->116
   33    99    >   INIT_FCALL                                               'abs'
        100        SEND_VAR                                                 !7
        101        DO_ICALL                                         $62     
        102        ADD                                              ~63     !5, $62
        103        INIT_FCALL                                               'abs'
        104        SEND_VAR                                                 !11
        105        DO_ICALL                                         $65     
        106        SUB                                              ~66     !4, $65
        107        INIT_FCALL                                               'mb_substr'
        108        SEND_VAR                                                 !0
        109        SEND_VAR                                                 !9
        110        SEND_VAL                                                 1
        111        DO_ICALL                                         $68     
        112        FETCH_DIM_W                                      $64     !6, ~63
        113        ASSIGN_DIM                                               $64, ~66
        114        OP_DATA                                                  $68
        115      > JMP                                                      ->134
   34   116    >   IS_SMALLER_OR_EQUAL                              ~69     !11, 0
        117      > JMPZ_EX                                          ~69     ~69, ->120
        118    >   IS_SMALLER_OR_EQUAL                              ~70     0, !7
        119        BOOL                                             ~69     ~70
        120    > > JMPZ                                                     ~69, ->134
   35   121    >   SUB                                              ~71     !5, !7
        122        INIT_FCALL                                               'abs'
        123        SEND_VAR                                                 !11
        124        DO_ICALL                                         $73     
        125        SUB                                              ~74     !4, $73
        126        INIT_FCALL                                               'mb_substr'
        127        SEND_VAR                                                 !0
        128        SEND_VAR                                                 !9
        129        SEND_VAL                                                 1
        130        DO_ICALL                                         $76     
        131        FETCH_DIM_W                                      $72     !6, ~71
        132        ASSIGN_DIM                                               $72, ~74
        133        OP_DATA                                                  $76
   25   134    >   PRE_INC                                                  !9
        135        ASSIGN_OP                                     1          !10, !8
        136    >   IS_SMALLER                                               !9, !1
        137      > JMPNZ                                                    ~79, ->36
   39   138    > > FE_RESET_R                                       $80     !6, ->148
        139    > > FE_FETCH_R                                               $80, !12, ->148
   40   140    > > FE_RESET_R                                       $81     !12, ->145
        141    > > FE_FETCH_R                                               $81, !13, ->145
   41   142    >   CAST                                          6  ~82     !13
        143        ECHO                                                     ~82
   40   144      > JMP                                                      ->141
        145    >   FE_FREE                                                  $81
   43   146        ECHO                                                     '%0A'
   39   147      > JMP                                                      ->139
        148    >   FE_FREE                                                  $80
   44   149      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.63 ms | 1408 KiB | 35 Q