Re: [PHP-DEV] PHP 4.0 Bug #6131: str_pad does not accept optional fourth parameter From: Flavien Lebarbé (flavien <email protected>)
Date: 08/20/00

billn <email protected> wrote:
>
> str_pad does not accept optional fourth parameter. Adding STR_PAD_LEFT
> or any fourth parameter causes Warning: Wrong parameter count for str_pad() error
>
> Example script:
> $emailpass=str_pad($emailpass, 12, " ", STR_PAD_LEFT);

After looking at the sources, it's obvious that the implementation of
the
optional fourth argument does not exist :)

For now, you can do it this way : $emailpass=str_pad($emailpass, -12,
" ");
It works.

I think I'll implement it soon though, because it's more readable this
way.

Flavien.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>