php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29715 string{1} changing to array
Submitted: 2004-08-17 05:11 UTC Modified: 2004-08-17 08:13 UTC
From: roberto at spadim dot com dot br Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.0.0 OS: linux slack9.1
Private report: No CVE-ID: None
 [2004-08-17 05:11 UTC] roberto at spadim dot com dot br
Description:
------------
When using:

function test{
$a{0}="ae";
echo $a;
}

returns:

Arrayae

with php4 it shows:

ae



Reproduce code:
---------------
function test{
$a{0}="ae";
echo $a;
}
test();

Expected result:
----------------
ae

Actual result:
--------------
Arrayae

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-17 08:13 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

Your example code doesn't run.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 08:01:30 2024 UTC