php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-02 17:31 UTC] mfischer@php.net
%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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 14:01:29 2024 UTC