imagerectangle

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Draw a rectangle
<?php imagerectangle(    GdImage $image,    int $x1,    int $y1,    int $x2,    int $y2,    int $color): bool
<?php         if ($this->hasBorder()) {

            $border_color = new Color($this->border_color);

            imagesetthickness($image->getCore(), $this->border_width);

            imagerectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $border_color->getInt());

        }



        return true;