php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52399 Negative character index
Submitted: 2010-07-22 06:07 UTC Modified: 2010-07-23 12:00 UTC
Votes:17
Avg. Score:3.5 ± 1.4
Reproduced:10 of 14 (71.4%)
Same Version:10 (100.0%)
Same OS:10 (100.0%)
From: olamedia at gmail dot com Assigned:
Status: Duplicate Package: Strings related
PHP Version: Irrelevant OS:
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: olamedia at gmail dot com
New email:
PHP Version: OS:

 

 [2010-07-22 06:07 UTC] olamedia at gmail dot com
Description:
------------
Retrieve characters from string end using negative index value.

Test script:
---------------
$string = 'abc';
echo $string[-1]; // 'c'


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-23 12:00 UTC] aharvey@php.net
-Status: Open +Status: Duplicate
 [2010-07-23 12:00 UTC] aharvey@php.net
This is a duplicate of request #17077.

In terms of the feature itself, it has been discussed before. The 2005
developer meeting resulted in a resolution to implement string slicing,
which would enable this feature, but as far as I know, there's been no
further movement on this since.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 31 11:01:24 2020 UTC