|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-02-15 09:27 UTC] moriyoshi@php.net
[2003-02-15 10:01 UTC] moriyoshi@php.net
[2012-11-12 22:33 UTC] salathe@php.net
[2012-11-12 22:33 UTC] salathe@php.net
[2012-11-12 22:34 UTC] salathe@php.net
[2012-11-12 22:34 UTC] salathe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
Witness the following code: printf( "PHP Version=%s\n", phpversion() ); print "Output should be [abc] in all cases\n"; $masks = Array( "%-3.3s", "%.3s", "%-.3s" ); $str = "abcdefg"; foreach ( $masks as $mask ) { printf( "[$mask] <-- %s\n", $str, $mask ); } Under 4.2.3 we get: PHP Version=4.2.3 Output should be [abc] in all cases [abc] <-- %-3.3s [abc] <-- %.3s [abc] <-- %-.3s Under 4.3.0 we get: PHP Version=4.3.0 Output should be [abc] in all cases [abcdefg] <-- %-3.3s [abc] <-- %.3s [abc] <-- %-.3s This breaks a TON of column-formatting code for our application. We're reverting to 4.2.3 until this is fixed. The test suite in ext/standard/tests/general_functions/001.phpt does not test that specific combination of width & precision.