3v4l.org

run code in 300+ PHP versions simultaneously
<?php $links = [ [ 'type_id' => '1', 'url' => '' ], [ 'type_id' => '2', 'url' => '' ] ]; $types = [ [ 'value' => 'facebook' ], [ 'value' => 'twitter' ] ]; $data = [ 'primary' => [ 'address_details' => [], 'contact_details' => [], 'social_links' => array_combine(array_column($types, 'value'), $links) ] ]; print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S03t1
function name:  (null)
number of ops:  19
compiled vars:  !0 = $links, !1 = $types, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   23     2        INIT_ARRAY                                       ~5      <array>, 'address_details'
          3        ADD_ARRAY_ELEMENT                                ~5      <array>, 'contact_details'
   25     4        INIT_FCALL                                               'array_combine'
          5        INIT_FCALL                                               'array_column'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 'value'
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ADD_ARRAY_ELEMENT                                ~5      $7, 'social_links'
         13        INIT_ARRAY                                       ~8      ~5, 'primary'
   21    14        ASSIGN                                                   !2, ~8
   28    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.77 ms | 1438 KiB | 16 Q