php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54904 strspn function
Submitted: 2011-05-22 16:20 UTC Modified: 2011-05-24 21:34 UTC
From: bertkrol at planet dot nl Assigned: salathe (profile)
Status: Closed Package: Strings related
PHP Version: Irrelevant OS: OSX
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: bertkrol at planet dot nl
New email:
PHP Version: OS:

 

 [2011-05-22 16:20 UTC] bertkrol at planet dot nl
Description:
------------
the strspn function only works if the first part of the string to be matched 
exists of the same character set as the mask.
Example strspn('123','123') gives 3
        strspn ('a123','123') gives 0




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-24 21:31 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=311396
Log: emphasize initial/start importance for strspn (re doc #54904)
 [2011-05-24 21:34 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2011-05-24 21:34 UTC] salathe@php.net
That is correct, though the documentation already tells you that.  Either way, 
I've made a few very small changes to hopefully clarify the behaviour.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jun 21 09:01:23 2021 UTC