php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35282 {} String offsets raise Strict Standards error, documentation not updated
Submitted: 2005-11-18 19:44 UTC Modified: 2005-12-06 16:46 UTC
From: brice dot joly at free dot fr Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2005-11-18 19:44 UTC] brice dot joly at free dot fr
Description:
------------
New PHP Strict Standards error as of 5.1.0RC6:

PHP Strict Standards: Usage of {} to access string offsets is deprecated and will be removed in PHP 6

Yet documentation claims {} should be used and [] are deprecated (see http://www.php.net/manual/en/language.types.string.php#language.types.string.substr)

1. What should be used now that both [] and {} are deprecated?
2. Please update documentation accordingly

Reproduce code:
---------------
$string = 'abc';
$b = $string{1};

Expected result:
----------------
N/A

Actual result:
--------------
N/A

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-18 19:50 UTC] tony2001@php.net
Please don't touch the docs, the discussion about this change is not finished yet.
 [2005-12-06 16:46 UTC] vrana@php.net
Final version removed this warning.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC