|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1544 Array in return of function bug
Submitted: 1999-06-15 10:53 UTC Modified: 1999-06-15 16:46 UTC
From: aulbach at unter dot franken dot de Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.8 OS: Linux 2.0.36
Private report: No CVE-ID: None
 [1999-06-15 10:53 UTC] aulbach at unter dot franken dot de

function bla() {
        $r="16% Bla";

echo bla();



06% Bla

(very strange!)

I have other examples, where the first char is e.g. a '.'. Think there will
be something mixed up.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-15 11:48 UTC] rasmus at cvs dot php dot net
Not strange at all.  When you define a string like you did 
with $r, then $r[0] is the first character in that string.
All strings can be accessed like that.
 [1999-06-15 16:46 UTC] aulbach at unter dot franken dot de
where is this mentioned in the manual? Hummm...
I'm at the second place of the manual authors
but I can't find it. :-) 

There is only a sentence in the "changes" about that the behaviour
of php3 has changed, but there is nothing what this really means.
I'm coming from php2, there the above construct works.

I think big parts of the manual has to be totally rewritten. I need a time
doubler. :-)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 02:01:31 2023 UTC