2008年10月1日星期三

Re: [fw-db] Zend_Db_Profiler_Firebug - query time fix

Diabl0 pisze:
> Christoph Dorn pisze:
>> Diabl0,
>>
>> Could you please take a look at ticket
>>
>> http://framework.zend.com/issues/browse/ZF-4437
>>
>> and provide your feedback.
Oh, i forgot

Json extension is instaled and loaded:


json

json support enabled
json version 1.2.1

tested on PHP 5.2.5 and 5.2.6 - same output

And updated test code:

$data = array ();
for($i = 1; $i < 10; $i ++) {
$data [] = rand ( 0, 10 ) / rand ( 2, 9 );
}

echo '<pre>'; var_dump ( $data ); echo '</pre>';

echo '<pre>json_encode'; print_r( json_encode( $data ) ); echo
'</pre>';
echo '<pre>ZJE::e'; print_r ( Zend_Json_Encoder::encode ( $data
) ); echo '</pre>';
echo '<pre>ZE::e'; print_r ( Zend_Json::encode ( $data ) ); echo
'</pre>';

array(9) {
[0]=>
int(2)
[1]=>
float(1,14285714286)
[2]=>
int(3)
[3]=>
float(1,42857142857)
[4]=>
float(1,75)
[5]=>
float(1,33333333333)
[6]=>
int(0)
[7]=>
float(1,28571428571)
[8]=>
float(0,5)
}

json_encode[2,1.14285714286,3,1.42857142857,1.75,1.33333333333,0,1.28571428571,0.5]

ZJE::e[2,1,14285714286,3,1,42857142857,1,75,1,33333333333,0,1,28571428571,0,5]

ZE::e[2,1.14285714286,3,1.42857142857,1.75,1.33333333333,0,1.28571428571,0.5]


--
Krzysztof Szatanik

没有评论: