Exactly. In javascript terms, that is what you'd expect since:
array(1=>'test')
..Isn't a valid array.
2009/3/17 Scott MacVicar :
> On 11 Mar 2009, at 19:25, Christopher Östlund wrote:
>
>> I think this behavior is a bit odd too:
>>
>> php -r "echo json_encode(array(0=>'test'));" // ["test"]
>>
On 11 Mar 2009, at 19:25, Christopher Östlund wrote:
I think this behavior is a bit odd too:
php -r "echo json_encode(array(0=>'test'));" // ["test"]
php -r "echo json_encode(array(1=>'test'));" // {"1":"test"}
The reason for this is encoding looks to see if the array is
sequentially numb
2009/3/11 Christopher Östlund :
> I think this behavior is a bit odd too:
>
> php -r "echo json_encode(array(0=>'test'));" // ["test"]
> php -r "echo json_encode(array(1=>'test'));" // {"1":"test"}
>
>
And
php -r "echo json_encode(array(0=>'test',3=>'foo'));" // {"0":"test","3":"foo"}
So it seem
I think this behavior is a bit odd too:
php -r "echo json_encode(array(0=>'test'));" // ["test"]
php -r "echo json_encode(array(1=>'test'));" // {"1":"test"}
On Tue, Mar 10, 2009 at 11:32 AM, Richard Quadling wrote:
> 2009/3/2 Scott MacVicar :
> > Richard Quadling wrote:
> >> 2009/3/2 Scott M
2009/3/2 Scott MacVicar :
> Richard Quadling wrote:
>> 2009/3/2 Scott MacVicar :
>>> Richard Quadling wrote:
Hi.
Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
to the unit tests too.
Any chance this could get committed to 5.2+
>>> I'm too co
2009/3/2 Ilia Alshanetsky :
> I believe that this is a feature, so it would not go into 5.2, sorry.
>
>
> Ilia Alshanetsky
>
That's OK. Just like to try these things sometimes.
>
>
>
> On 2-Mar-09, at 11:21 AM, Richard Quadling wrote:
>
>> Hi.
>>
>> Regarding http://bugs.php.net/bug.php?id=47493,
I believe that this is a feature, so it would not go into 5.2, sorry.
Ilia Alshanetsky
On 2-Mar-09, at 11:21 AM, Richard Quadling wrote:
Hi.
Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
to the unit tests too.
Any chance this could get committed to 5.2+
Index:
2009/3/2 Scott MacVicar :
> Richard Quadling wrote:
>> 2009/3/2 Scott MacVicar :
>>> Richard Quadling wrote:
Hi.
Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
to the unit tests too.
Any chance this could get committed to 5.2+
>>> I'm too co
Richard Quadling wrote:
> 2009/3/2 Scott MacVicar :
>> Richard Quadling wrote:
>>> Hi.
>>>
>>> Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
>>> to the unit tests too.
>>>
>>> Any chance this could get committed to 5.2+
>>>
>> I'm too convinced of the parameter name and I do
2009/3/2 Scott MacVicar :
> Richard Quadling wrote:
>> Hi.
>>
>> Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
>> to the unit tests too.
>>
>> Any chance this could get committed to 5.2+
>>
>
> I'm too convinced of the parameter name and I don't think its something
> that sh
Richard Quadling wrote:
> Hi.
>
> Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
> to the unit tests too.
>
> Any chance this could get committed to 5.2+
>
I'm too convinced of the parameter name and I don't think its something
that should be added to 5.2.9 since its a fe
Hi.
Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch
to the unit tests too.
Any chance this could get committed to 5.2+
Index: tests/002.phpt
===
RCS file: /repository/php-src/ext/json/tests/002.phpt,v
retriev
12 matches
Mail list logo