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
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.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC