php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #32595 $str{begin,length} Substring operator?
Submitted: 2005-04-05 19:36 UTC Modified: 2005-04-05 19:44 UTC
From: sb at stephenbrooks dot org Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.9 OS: Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sb at stephenbrooks dot org
New email:
PHP Version: OS:

 

 [2005-04-05 19:36 UTC] sb at stephenbrooks dot org
Description:
------------
Odd, I thought this was actually in PHP5 already, but could find no mention of it in the documentation.  It's not in the PHP4 I have here anyway.

The feature would work as in the title: $str{begin,length} would work as substr($str,begin,length).  Just a notational convenience, but struck me as a natural (and useful) extension of the $str{n} operator.

Nonessential :)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-05 19:44 UTC] derick@php.net
This was discussed already, and not going to happen.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC