php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72430 [] operator not supported for strings
Submitted: 2016-06-16 13:50 UTC Modified: 2016-09-14 10:56 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: rmoisto at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: 7.1.0alpha1 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rmoisto at gmail dot com
New email:
PHP Version: OS:

 

 [2016-06-16 13:50 UTC] rmoisto at gmail dot com
Description:
------------
Fatal error when redeclaring a string as an array.

Not sure if it's a backwards compatibility issue or an actual bug.

Test script:
---------------
https://3v4l.org/HBGvH
<?php

$r = '';
$r[] = '';

Actual result:
--------------
Fatal error: Uncaught Error: [] operator not supported for strings

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-20 05:25 UTC] krakjoe@php.net
-Status: Open +Status: Verified
 [2016-06-20 16:32 UTC] krakjoe@php.net
-Package: *General Issues +Package: Documentation problem
 [2016-06-20 16:32 UTC] krakjoe@php.net
Backward compatibility broken by fix for: https://bugs.php.net/bug.php?id=53432

Requires documentation changes.
 [2016-06-20 16:32 UTC] krakjoe@php.net
-Status: Verified +Status: Open
 [2016-07-30 14:45 UTC] kalle@php.net
-Type: Bug +Type: Documentation Problem
 [2016-09-14 00:44 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2016-09-14 10:44 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=219d8599b04162a0ba733513dcab71a996b88f56
Log: Fix #72430: [] operator not supported for strings
 [2016-09-14 10:44 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2016-09-14 10:44 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened
 [2016-09-14 10:56 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=340030
Log: Fix #72430: [] operator not supported for strings
 [2016-09-14 10:56 UTC] cmb@php.net
-Status: Re-Opened +Status: Closed
 [2016-10-17 10:08 UTC] bwoebi@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=219d8599b04162a0ba733513dcab71a996b88f56
Log: Fix #72430: [] operator not supported for strings
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=1b5a19a7b48aca96e0c21494dc29636764feff37
Log: Fix #72430: [] operator not supported for strings
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Apr 04 13:01:29 2025 UTC