3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj_array=(object)[ ['label'=>'1509521006','value'=>'12.324711'], ['label'=>'1509531448','value'=>'12.700929'] ]; $your_json=json_encode($obj_array); // now convert to index the subarrays... echo json_encode(array_map('array_values',json_decode($your_json,true))); //var_export(json_decode($json,true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AtRGf
function name:  (null)
number of ops:  19
compiled vars:  !0 = $obj_array, !1 = $your_json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~2      <array>
    2     1        ASSIGN                                                   !0, ~2
    6     2        INIT_FCALL                                               'json_encode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    9     6        INIT_FCALL                                               'json_encode'
          7        INIT_FCALL                                               'array_map'
          8        SEND_VAL                                                 'array_values'
          9        INIT_FCALL                                               'json_decode'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                         $8      
         17        ECHO                                                     $8
   10    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.05 ms | 999 KiB | 16 Q