ID: 36524 Updated by: [EMAIL PROTECTED] Reported By: terrafrost at gmail dot com Status: Open Bug Type: Feature/Change Request Operating System: any PHP Version: 4.4.2 New Comment:
This is planned for PHP 6: http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs Previous Comments: ------------------------------------------------------------------------ [2006-02-25 06:55:37] terrafrost at gmail dot com 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... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36524&edit=1