From:             bugs dot php dot net at bluetwanger dot de
Operating system: 
PHP version:      5.0.1
PHP Bug Type:     Unknown/Other Function
Bug description:  printf handles repeated placeholders wrong

Description:
------------
printf('%s - %s %s %3$s %2$s', 1, 2, 3);

complains:

Warning: printf(): Too few arguments in /home/bertheau/printf.php on line
2

printf('%s - %s %s %3$s %2$s', 1, 2, 3, 4);

does not complain and prints:

1 - 2 3 3 2

I expect the first version to not complain and print what the second
version prints.



-- 
Edit bug report at http://bugs.php.net/?id=29733&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29733&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29733&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29733&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29733&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29733&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29733&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29733&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29733&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29733&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29733&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29733&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29733&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29733&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29733&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29733&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29733&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29733&r=float

Reply via email to