3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locations = array ( 'address' => 'R. da Liberdade, 13 - Boqueirão, Santos - SP, 11025-030, Brasil', 'lat' => -23.9593778, 'lng' => -46.3213139, 'zoom' => 14, 'place_id' => 'ChIJcQuV-KYDzpQR9vS809TSj9I', 'street_number' => 13, 'street_name' => 'Rua da Liberdade', 'street_name_short' => 'R. da Liberdade', 'state' => 'São Paulo', 'state_short' => 'SP', 'post_code' => '11025-030', 'country' => 'Brasil', 'country_short' => 'BR', 'city' => 'Santos', 'neighborhood' => 'Boqueirão', ); $address = []; if (isset($locations['neighborhood'])) $address[] = $locations['neighborhood']; if (isset($locations['city'])) $address[] = $locations['city']; if (isset($locations['state'])) $address[] = $locations['state']; elseif (isset($locations['state_short'])) $address[] = $locations['state_short']; $address = implode(', ', $address); echo $address;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/hZm03
function name:  (null)
number of ops:  30
compiled vars:  !0 = $locations, !1 = $address
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        ASSIGN                                                   !1, <array>
   22     2        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'neighborhood'
          3      > JMPZ                                                     ~4, ->7
          4    >   FETCH_DIM_R                                      ~6      !0, 'neighborhood'
          5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  ~6
   23     7    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'city'
          8      > JMPZ                                                     ~7, ->12
          9    >   FETCH_DIM_R                                      ~9      !0, 'city'
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  ~9
   24    12    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'state'
         13      > JMPZ                                                     ~10, ->18
         14    >   FETCH_DIM_R                                      ~12     !0, 'state'
         15        ASSIGN_DIM                                               !1
         16        OP_DATA                                                  ~12
         17      > JMP                                                      ->23
   25    18    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'state_short'
         19      > JMPZ                                                     ~13, ->23
         20    >   FETCH_DIM_R                                      ~15     !0, 'state_short'
         21        ASSIGN_DIM                                               !1
         22        OP_DATA                                                  ~15
   27    23    >   INIT_FCALL                                               'implode'
         24        SEND_VAL                                                 '%2C+'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $16     
         27        ASSIGN                                                   !1, $16
   28    28        ECHO                                                     !1
   29    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.81 ms | 1011 KiB | 14 Q