3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rectangleIt($c1, $c2, $w,$h) { $resetc1 = $c1;//border character $resetc2 = $c2;//inner character $z = 1; while ( $z <= $h) { //loop height switch ($z) { case 1: //top border $i = 1; echo "&nbsp;"; while ( $i <= $w) { //loop width echo $resetc1; $i++; } break; case $h: //bottom border $x = 1; echo "<br>"; echo "&nbsp;"; while ( $x <= $w) { //loop width echo $resetc1; $x++; } break; default: $y = 1; echo "<br>".$resetc1; while ( $y <= $w) { echo $resetc2; $y++; } echo $resetc1; break; } $z++; } } //function call rectangleIt("L","H","50","20"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bPJXA
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   47     0  E >   INIT_FCALL                                               'rectangleit'
          1        SEND_VAL                                                 'L'
          2        SEND_VAL                                                 'H'
          3        SEND_VAL                                                 '50'
          4        SEND_VAL                                                 '20'
          5        DO_FCALL                                      0          
   49     6      > RETURN                                                   1

Function rectangleit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 8
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 34
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 8
Branch analysis from position: 43
Branch analysis from position: 8
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 34
Branch analysis from position: 38
Branch analysis from position: 34
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 25
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 25
Branch analysis from position: 29
Branch analysis from position: 25
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 16
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 16
Branch analysis from position: 20
Branch analysis from position: 16
filename:       /in/bPJXA
function name:  rectangleIt
number of ops:  44
compiled vars:  !0 = $c1, !1 = $c2, !2 = $w, !3 = $h, !4 = $resetc1, !5 = $resetc2, !6 = $z, !7 = $i, !8 = $x, !9 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        ASSIGN                                                   !4, !0
    5     5        ASSIGN                                                   !5, !1
    7     6        ASSIGN                                                   !6, 1
    8     7      > JMP                                                      ->41
   11     8    >   IS_EQUAL                                                 !6, 1
          9      > JMPNZ                                                    ~13, ->13
   20    10    >   IS_EQUAL                                                 !6, !3
         11      > JMPNZ                                                    ~13, ->21
         12    > > JMP                                                      ->30
   12    13    >   ASSIGN                                                   !7, 1
   13    14        ECHO                                                     '%26nbsp%3B'
   14    15      > JMP                                                      ->18
   15    16    >   ECHO                                                     !4
   16    17        PRE_INC                                                  !7
   14    18    >   IS_SMALLER_OR_EQUAL                                      !7, !2
         19      > JMPNZ                                                    ~16, ->16
   18    20    > > JMP                                                      ->40
   21    21    >   ASSIGN                                                   !8, 1
   22    22        ECHO                                                     '%3Cbr%3E'
   23    23        ECHO                                                     '%26nbsp%3B'
   24    24      > JMP                                                      ->27
   25    25    >   ECHO                                                     !4
   26    26        PRE_INC                                                  !8
   24    27    >   IS_SMALLER_OR_EQUAL                                      !8, !2
         28      > JMPNZ                                                    ~19, ->25
   28    29    > > JMP                                                      ->40
   31    30    >   ASSIGN                                                   !9, 1
   32    31        CONCAT                                           ~21     '%3Cbr%3E', !4
         32        ECHO                                                     ~21
   33    33      > JMP                                                      ->36
   34    34    >   ECHO                                                     !5
   35    35        PRE_INC                                                  !9
   33    36    >   IS_SMALLER_OR_EQUAL                                      !9, !2
         37      > JMPNZ                                                    ~23, ->34
   37    38    >   ECHO                                                     !4
   38    39      > JMP                                                      ->40
   40    40    >   PRE_INC                                                  !6
    8    41    >   IS_SMALLER_OR_EQUAL                                      !6, !3
         42      > JMPNZ                                                    ~25, ->8
   44    43    > > RETURN                                                   null

End of function rectangleit

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.46 ms | 1402 KiB | 14 Q