#34116 [NEW]: support for variable length printf strings
| From: | ondrej at sury dot org | Date: | Sat, 13 Aug 2005 09:35:52 +0000 |
| Subject: | #34116 [NEW]: support for variable length printf strings | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-83507@lists.php.net to get a copy of this message | ||
From: ondrej at sury dot org
Operating system:
PHP version: 4CVS-2005-08-13 (stable)
PHP Bug Type: Feature/Change Request
Bug description: support for variable length printf strings
Description:
------------
PHP's printf does not support variable width/precision.
Compare that with "printf '%*s' 10 'foobar'" in a shell script.
Reproduce code:
---------------
<?php
$length = 10;
printf("%*s", $length, "foobar");
?>
Expected result:
----------------
foobar
Actual result:
--------------
s
--
Edit bug report at http://bugs.php.net/?id=34116&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34116&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34116&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34116&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34116&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34116&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34116&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34116&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34116&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34116&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34116&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34116&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34116&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34116&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34116&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34116&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34116&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34116&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34116&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34116&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34116&r=mysqlcfg