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;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oP7pa
function name:  (null)
number of ops:  34
compiled vars:  !0 = $points, !1 = $feature, !2 = $json_parcours, !3 = $jsonData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'serialize_precision'
          2        SEND_VAL                                                 60
          3        DO_ICALL                                                 
    5     4        ECHO                                                     'serialize_precision%3A+'
          5        INIT_FCALL                                               'ini_get'
          6        SEND_VAL                                                 'serialize_precision'
          7        DO_ICALL                                         $5      
          8        ECHO                                                     $5
          9        ECHO                                                     '%0A'
    7    10        ASSIGN                                                   !0, <array>
   13    11        INIT_ARRAY                                       ~7      'Feature', 'type'
   15    12        INIT_ARRAY                                       ~8      'LineString', 'type'
   16    13        INIT_FCALL                                               'array_map'
         14        SEND_VAL                                                 'array_reverse'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $9      
         17        ADD_ARRAY_ELEMENT                                ~8      $9, 'coordinates'
         18        ADD_ARRAY_ELEMENT                                ~7      ~8, 'geometry'
   13    19        ADD_ARRAY_ELEMENT                                ~7      <array>, 'properties'
   12    20        ASSIGN                                                   !1, ~7
   22    21        INIT_ARRAY                                       ~11     'FeatureCollection', 'type'
   23    22        INIT_ARRAY                                       ~12     !1
         23        ADD_ARRAY_ELEMENT                                ~11     ~12, 'features'
   21    24        ASSIGN                                                   !2, ~11
   26    25        INIT_FCALL                                               'json_encode'
         26        SEND_VAR                                                 !2
         27        SEND_VAL                                                 256
         28        DO_ICALL                                         $14     
         29        ASSIGN                                                   !3, $14
   28    30        ECHO                                                     'jsonData+%3D+'
         31        ECHO                                                     !3
         32        ECHO                                                     '%0A'
   29    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.09 ms | 1004 KiB | 17 Q