3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines = <<<EOF fund,name,investment,region,sector,status,description,acquisition_date,size,address_line_1,address_line_2,city,county,postcode,longitude,latitude,featured,external_link "Fund 1","Property Name","Investment Name","London","Office","Published","","","","","","London","","","","","","" EOF; $array = array_map('str_getcsv', explode(PHP_EOL, $lines)); array_walk($array, function(&$a) use ($array) { $a = array_combine($array[0], $a); }); array_shift($array); foreach ($array as $element) { echo $element['fund'], "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/ru4e9
function name:  (null)
number of ops:  27
compiled vars:  !0 = $lines, !1 = $array, !2 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'fund%2Cname%2Cinvestment%2Cregion%2Csector%2Cstatus%2Cdescription%2Cacquisition_date%2Csize%2Caddress_line_1%2Caddress_line_2%2Ccity%2Ccounty%2Cpostcode%2Clongitude%2Clatitude%2Cfeatured%2Cexternal_link%0A%22Fund+1%22%2C%22Property+Name%22%2C%22Investment+Name%22%2C%22London%22%2C%22Office%22%2C%22Published%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22London%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22'
    8     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'str_getcsv'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%0A'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
   10    10        INIT_FCALL                                               'array_walk'
         11        SEND_REF                                                 !1
         12        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
         13        BIND_LEXICAL                                             ~7, !1
   12    14        SEND_VAL                                                 ~7
   10    15        DO_ICALL                                                 
   14    16        INIT_FCALL                                               'array_shift'
         17        SEND_REF                                                 !1
         18        DO_ICALL                                                 
   16    19      > FE_RESET_R                                       $10     !1, ->25
         20    > > FE_FETCH_R                                               $10, !2, ->25
   17    21    >   FETCH_DIM_R                                      ~11     !2, 'fund'
         22        ECHO                                                     ~11
         23        ECHO                                                     '%0A'
   16    24      > JMP                                                      ->20
         25    >   FE_FREE                                                  $10
   18    26      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ru4e9
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $a, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   11     2        INIT_FCALL                                               'array_combine'
          3        FETCH_DIM_R                                      ~2      !1, 0
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
   12     8      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
253.76 ms | 1011 KiB | 18 Q