3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = json_decode('[ { "zipcode": 35004, "state abbreviation": "AL", "latitude": 33.606379, "longitude": -86.50249, "city": "Moody", "state": "Alabama" }, { "zipcode": 35005, "state abbreviation": "AL", "latitude": 33.606379, "longitude": -86.50249, "city": "Moody", "state": "Alabama" } ]'); $zipcode = 35004; $index = array_search($zipcode, array_column($json, 'zipcode')); print_r($json[$index]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TAXQq
function name:  (null)
number of ops:  19
compiled vars:  !0 = $json, !1 = $zipcode, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%5B%0A++++%7B%0A++++++%22zipcode%22%3A+35004%2C%0A++++++%22state+abbreviation%22%3A+%22AL%22%2C%0A++++++%22latitude%22%3A+33.606379%2C%0A++++++%22longitude%22%3A+-86.50249%2C%0A++++++%22city%22%3A+%22Moody%22%2C%0A++++++%22state%22%3A+%22Alabama%22%0A++++%7D%2C%0A++++%7B%0A++++++%22zipcode%22%3A+35005%2C%0A++++++%22state+abbreviation%22%3A+%22AL%22%2C%0A++++++%22latitude%22%3A+33.606379%2C%0A++++++%22longitude%22%3A+-86.50249%2C%0A++++++%22city%22%3A+%22Moody%22%2C%0A++++++%22state%22%3A+%22Alabama%22%0A++++%7D%0A%5D'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
   21     4        ASSIGN                                                   !1, 35004
   23     5        INIT_FCALL                                               'array_search'
          6        SEND_VAR                                                 !1
          7        INIT_FCALL                                               'array_column'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 'zipcode'
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !2, $7
   25    14        INIT_FCALL                                               'print_r'
         15        FETCH_DIM_R                                      ~9      !0, !2
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.17 ms | 1456 KiB | 17 Q