<?php // your code goes here echo json_encode(['test' => number_format(1, 4, '.', '')]);
Standard input is empty
{"test":"1.0000"}
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!