Re: PHP 4.0 Bug #7863 Updated: str_pad only taking 3 params, not 4

From: Date: Fri, 17 Nov 2000 14:39:54 +0000
Subject: Re: PHP 4.0 Bug #7863 Updated: str_pad only taking 3 params, not 4
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-38412@lists.php.net to get a copy of this message
Hello Andrei, You may be right :-) I'm running 4.0.1pl2 on a production machine, and it doesnt work, I haven't check the 4.0.3pl1 which I have on a dev machine. However, the online (http://www.php.net/manual/function.str-pad.php) docs say str_pad is in (PHP 4 >= 4.0.1). Perhaps they should say the 4 parameter version is only in PHP4 >= 4.0.2 ? Thanks anyway, Rickey. At 14:24 17/11/00 +0000, you wrote:
ID: 7863 Updated by: andrei Reported By: rickey@lefteris.cix.co.uk Status: Closed Bug Type: Strings related Assigned To: Comments: Please make sure you are using the correct version of PHP. In PHP 4.0.2 and later, str_pad() definitely allows 4 arguments. Previous Comments: --------------------------------------------------------------------------- [2000-11-17 06:44:03] rickey@lefteris.cix.co.uk the str_pad function generates "Warning: Wrong parameter count for str_pad() plus file and line number stuff." from a line of code like str_pad( 12, 4, "0", STR_PAD_LEFT); docs say str_pad should take 4 parameters, but only works with 3. Looks like you cant specify PAD_TYPE so function only does right padding. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7863


« previous php.dev (#38412) next »