#42107 [Asn->Csd]: sscanf broken when using %2$s type format parameters
| From: | jani@php.net | Date: | Thu, 26 Jul 2007 15:24:18 +0000 |
| Subject: | #42107 [Asn->Csd]: sscanf broken when using %2$s type format parameters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115470@lists.php.net to get a copy of this message | ||
ID: 42107
Updated by: jani@php.net
Reported By: mike at theupstairsroom dot com
-Status: Assigned
+Status: Closed
Bug Type: Strings related
Operating System: CentOS
PHP Version: 5.2.3
Assigned To: jani
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-07-26 14:27:50] jani@php.net
Fix prepared. Running test now..
------------------------------------------------------------------------
[2007-07-26 00:54:35] mike at theupstairsroom dot com
Description:
------------
Unexpected results returned when using positioned parameters in
sscanf()
Reproduce code:
---------------
$test = sscanf('test string', '%2$s %1$s');
print_r($test);
Expected result:
----------------
array(
[0] => 'string',
[1] => 'test'
)
Actual result:
--------------
Array
(
[0] =>
[1] =>
[3] => test
[2] => string
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42107&edit=1