Json conversion of php, which automatically converts strings into numbers.

{"returnCode":"0","resultCode":"0","amount":1.00}
 $param= "{"returnCode":"0","resultCode":"0","amount":1.00}";
 $param=json_decode($param,true);

default amount is forcibly converted. Can you output it as is


Array
(
    [returnCode] => 0
    [resultCode] => 0
    [amount] => 1
)

wants


Array
(
    [returnCode] => 0
    [resultCode] => 0
    [amount] => 1.00
)

this effect meets the requirements
amount is automatically converted to number format 1? php bug?

Mar.23,2021

this is a number.

  

there is no bug, requirement problem, your requirement is to force floating-point display, then your problem should be how to force floating-point data output. Thank you, the specific code, due to personal bug reasons, input can not come up, find their own.

Menu