Supported Versions: PHP 7, PHP 8
Integer division
<?php intdiv(int $num1, int $num2): int
<?php         $strippedText = $this->stripAnsi($text);



        $width = $this->getFullWidth($columnWidths);

        $halfWidth = intdiv($width, 2);

        $halfTextWidth = intdiv(strlen($strippedText), 2);



        return str_repeat(' ', $halfWidth - $halfTextWidth) . $text . str_repeat(' ', $halfWidth - $halfTextWidth) . "\n";
<?php         $width = $this->getFullWidth($columnWidths);

        $halfWidth = intdiv($width, 2);

        $halfTextWidth = intdiv(strlen($strippedText), 2);



        return str_repeat(' ', $halfWidth - $halfTextWidth) . $text . str_repeat(' ', $halfWidth - $halfTextWidth) . "\n";

    }