|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2006-02-25 17:24 UTC] derick@php.net
[2015-01-09 00:12 UTC] ajf@php.net
-Package: Feature/Change Request
+Package: *General Issues
-Operating System: any
+Operating System: *
-PHP Version: 4.4.2
+PHP Version: *
[2015-01-09 00:12 UTC] ajf@php.net
[2015-01-09 00:13 UTC] ajf@php.net
-Package: *General Issues
+Package: Strings related
[2016-01-04 17:36 UTC] francois@php.net
-Assigned To:
+Assigned To: francois
[2016-03-07 11:52 UTC] francois@php.net
-Status: Assigned
+Status: Closed
[2016-03-07 11:52 UTC] francois@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 11:00:01 2025 UTC |
Description: ------------ Currently, in PHP, if you want to reference the last character of a string, you'd need to do something like $x{strlen($x)-1}. If using substr, however, you can do substr($x,-1,1) or substr($x,strlen($x)-1,1). In keeping with the former substr example, $x{-1} could be made to access the last character of a string as well. Since, right now, using negative numbers will result in a warning, it seems unlikely that any existing code is going to be broken by such a change...