php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6020 str_pad with the fourth param got a warning
Submitted: 2000-08-08 09:17 UTC Modified: 2000-08-08 19:26 UTC
From: ccjeagle at ms6 dot hinet dot net Assigned:
Status: Closed Package: Other
PHP Version: 4.0.1pl2 OS: FreeBSD4.1
Private report: No CVE-ID: None
 [2000-08-08 09:17 UTC] ccjeagle at ms6 dot hinet dot net
With the script:
<?
$str = "xyz" ;
echo str_pad($str,9,"abcd",STR_PAD_BOTH) ;
?>
I got a warning message:
"Wrong parameter count for str_pad()"

But without STR_PAD_BOTH 
she works fine.

My php.ini is the same as php.ini-optimized.

Regards.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-08 09:36 UTC] andrei@php.net
Seems to work for me, outputs:

abcxyzabc
 [2000-08-08 09:40 UTC] waldschrott@php.net
works for me (win2k/b08-02) too
 [2000-08-08 10:12 UTC] stas@php.net
works for me too, so I'll suspend it until at least one evidence of what happens arrives.
 [2000-08-08 19:26 UTC] hholzgra@php.net
the optional 4th parameter was introduced immedeatly
_after_ the 4.0.1* releases (release tag is on strings.c 1.132,
additional parameter patch is 1.133), so it can't worl in 4.0.1pl2
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 10:03:45 2023 UTC