private function block($textblock)
    {
        $length = 0;
        foreach ($textblock as $line) {
            $n = strlen($line);
            if ($length < $n) {
                $length = $n;
            }
        }

        foreach ($textblock as $i => $line) {
            $textblock[$i] .= str_repeat(' ', $length - strlen($line));
        }

        return $textblock;
    }
private function block($textblock)
    {
        $length = 0;
        foreach ($textblock as $line) {
            $n = strlen($line);
            if ($length < $n) {
                $length = $n;
            }
        }

        foreach ($textblock as $i => $line) {
            $textblock[$i] .= str_repeat(' ', $length - strlen($line));
        }

        return $textblock;
    }
private function block ( $ textblock ) { $ length = 0 ; foreach ( $ textblock as $ line ) { $ n = strlen ( $ line ) ; if ( $ length < $ n ) { $ length = $ n ; } } foreach ( $ textblock as $ i => $ line ) { $ textblock [ $ i ] .= str_repeat ( ' ' , $ length - strlen ( $ line ) ) ; } return $ textblock ; }
Fill each line with spaces, so that all are equal in length.

@param string[] $textblock
@return string[]
Fill each line with spaces so that all are equal in length .