3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON [ [ 51.11041991029261, -2.274169921875 ], [ 51.08282186160978, -3.460693359375 ], [ 50.443513052458044, -3.570556640625 ], [ 50.443513052458044, -1.966552734375 ] ] JSON; $coords = json_decode($json, true); $lats = array_column($coords, 0); $lons = array_column($coords, 1); var_dump($lats, $lons);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CoEt2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $json, !1 = $coords, !2 = $lats, !3 = $lons
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B+%5B+51.11041991029261%2C+-2.274169921875+%5D%2C+%5B+51.08282186160978%2C+-3.460693359375+%5D%2C+%5B+50.443513052458044%2C+-3.570556640625+%5D%2C+%5B+50.443513052458044%2C+-1.966552734375+%5D+%5D'
    7     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    8     6        INIT_FCALL                                               'array_column'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 0
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
    9    11        INIT_FCALL                                               'array_column'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !3, $9
   12    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.88 ms | 1386 KiB | 19 Q