php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7863 str_pad only taking 3 params, not 4
Submitted: 2000-11-17 06:44 UTC Modified: 2000-11-17 09:24 UTC
From: rickey at lefteris dot cix dot co dot uk Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0.3pl1 OS: SunOS 5.6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rickey at lefteris dot cix dot co dot uk
New email:
PHP Version: OS:

 

 [2000-11-17 06:44 UTC] rickey at lefteris dot cix dot co dot 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.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-17 09:24 UTC] andrei@php.net
Please make sure you are using the correct version of PHP. In PHP 4.0.2 and later, str_pad() definitely allows 4 arguments.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC