3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[{"city":"Berlin"},{"city":"London"},{"city":"New York", {"city":"Vienna"}]'; $array = json_decode($json, true); print_r(array_column($array, 'city', 'city'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEBL9
function name:  (null)
number of ops:  15
compiled vars:  !0 = $json, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5B%7B%22city%22%3A%22Berlin%22%7D%2C%7B%22city%22%3A%22London%22%7D%2C%7B%22city%22%3A%22New+York%22%2C+%7B%22city%22%3A%22Vienna%22%7D%5D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'print_r'
          7        INIT_FCALL                                               'array_column'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 'city'
         10        SEND_VAL                                                 'city'
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
206.4 ms | 1011 KiB | 16 Q