|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13518 sscanf don't like the next character following the field definition.
Submitted: 2001-10-02 14:32 UTC Modified: 2001-10-02 17:31 UTC
From: bomek at egeolog dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.0.6 OS: Linux 2.4.9 (redhat 6.2)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: bomek at egeolog dot com
New email:
PHP Version: OS:


 [2001-10-02 14:32 UTC] bomek at egeolog dot com
$string = "aaa:bbb:ccc:ddd";
list($a,$b,$c,$d) = sscanf($string,"%s:%s:%s:%s");
print "$a,$b,$c,$d\n";

$string will be contained in $a instead of being splitted in $a,$b,$c,$d.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-02 17:31 UTC]
%s Matches a sequence of non-white-space characters. This is taken straight from the sscanf manual page. Although PHP has its own implemention, at this point they do match.

If you have such simple things you might want to use explode(), split() and friends.

Not a bug, bogusified.

- Markus
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 10:03:37 2023 UTC