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; print("/n>"); //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/W124o
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          
          6      > RETURN                                                   1

Function rectangleit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 8
Branch analysis from position: 42
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 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 33
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 8
Branch analysis from position: 42
Branch analysis from position: 8
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 33
Branch analysis from position: 37
Branch analysis from position: 33
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 24
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 24
Branch analysis from position: 28
Branch analysis from position: 24
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 = 39
Branch analysis from position: 39
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/W124o
function name:  rectangleIt
number of ops:  43
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                                                      ->40
   11     8    >   IS_EQUAL                                                 !6, 1
          9      > JMPNZ                                                    ~13, ->13
   20    10    >   IS_EQUAL                                                 !6, !3
         11      > JMPNZ                                                    ~13, ->21
         12    > > JMP                                                      ->29
   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                                                      ->39
   21    21    >   ASSIGN                                                   !8, 1
   22    22        ECHO                                                     '%2Fn%3E'
   24    23      > JMP                                                      ->26
   25    24    >   ECHO                                                     !4
   26    25        PRE_INC                                                  !8
   24    26    >   IS_SMALLER_OR_EQUAL                                      !8, !2
         27      > JMPNZ                                                    ~19, ->24
   28    28    > > JMP                                                      ->39
   31    29    >   ASSIGN                                                   !9, 1
   32    30        CONCAT                                           ~21     '%3Cbr%3E', !4
         31        ECHO                                                     ~21
   33    32      > JMP                                                      ->35
   34    33    >   ECHO                                                     !5
   35    34        PRE_INC                                                  !9
   33    35    >   IS_SMALLER_OR_EQUAL                                      !9, !2
         36      > JMPNZ                                                    ~23, ->33
   37    37    >   ECHO                                                     !4
   38    38      > JMP                                                      ->39
   40    39    >   PRE_INC                                                  !6
    8    40    >   IS_SMALLER_OR_EQUAL                                      !6, !3
         41      > JMPNZ                                                    ~25, ->8
   44    42    > > RETURN                                                   null

End of function rectangleit

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.66 ms | 1403 KiB | 14 Q