<?php$arr = [ 'a'=>2.4, 'b'=>3 ]; print_r($arr); /** * ( [a] => 2.4 [b] => 3 ) */ var_dump(json_encode($arr));//{"a":2.3999999999999999,"b":3} /** * 明明是2.4
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号