3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('serialize_precision', 60); // ini_set('serialize_precision', -1); echo 'serialize_precision: ', ini_get('serialize_precision'), PHP_EOL; $points = [ [45.29077, 5.63361], [45.29083, 5.63384] ]; $feature = [ "type" => "Feature", "geometry" => [ "type" => "LineString", "coordinates" => array_map('array_reverse', $points) ], "properties" => [] ]; $json_parcours = [ "type" => "FeatureCollection", "features" => [$feature] ]; $jsonData = json_encode($json_parcours, JSON_UNESCAPED_UNICODE); echo 'jsonData = ', $jsonData, PHP_EOL;
Output for git.master_jit, git.master
serialize_precision: 60 jsonData = {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"LineString","coordinates":[[5.63361000000000000653699316899292171001434326171875,45.29077000000000197132976609282195568084716796875],[5.63384000000000018104628907167352735996246337890625,45.290829999999999699866748414933681488037109375]]},"properties":[]}]}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
34.7 ms | 406 KiB | 5 Q