3v4l.org

run code in 500+ PHP versions simultaneously
<?php $input = <<<SSV si;dialed_no;connect_time;duration;region;call_cost 0;918592877727;2015-08-25 18:51:01;21;India(91);0.029 1;918907777727;2015-08-25 19:04:08;220;India(91);0.232 2;918907777727;2015-08-25 19:09:50;40;India(91);0.058 3;918907777727;2015-08-25 19:10:46;69;India(91);0.087 4;919048232151;2015-08-26 13:30:24;19;India(91);0.029 5;919895842822;2015-08-26 14:23:35;423;India(91);0.435 SSV; $lines = explode(PHP_EOL, $input); $header = str_getcsv(array_shift($lines), ';'); foreach ($lines as $line) { $result[] = array_combine($header, str_getcsv($line, ';')); } echo json_encode($result, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 27
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/X8adQ
function name:  (null)
number of ops:  34
compiled vars:  !0 = $input, !1 = $lines, !2 = $header, !3 = $line, !4 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'si%3Bdialed_no%3Bconnect_time%3Bduration%3Bregion%3Bcall_cost%0A0%3B918592877727%3B2015-08-25+18%3A51%3A01%3B21%3BIndia%2891%29%3B0.029%0A1%3B918907777727%3B2015-08-25+19%3A04%3A08%3B220%3BIndia%2891%29%3B0.232%0A2%3B918907777727%3B2015-08-25+19%3A09%3A50%3B40%3BIndia%2891%29%3B0.058%0A3%3B918907777727%3B2015-08-25+19%3A10%3A46%3B69%3BIndia%2891%29%3B0.087%0A4%3B919048232151%3B2015-08-26+13%3A30%3A24%3B19%3BIndia%2891%29%3B0.029%0A5%3B919895842822%3B2015-08-26+14%3A23%3A35%3B423%3BIndia%2891%29%3B0.435'
   13     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     '%0A'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $6      
          5        ASSIGN                                                       !1, $6
   14     6        INIT_FCALL                                                   'str_getcsv'
          7        INIT_FCALL                                                   'array_shift'
          8        SEND_REF                                                     !1
          9        DO_ICALL                                             $8      
         10        SEND_VAR                                                     $8
         11        SEND_VAL                                                     '%3B'
         12        DO_ICALL                                             $9      
         13        ASSIGN                                                       !2, $9
   15    14      > FE_RESET_R                                           $11     !1, ->27
         15    > > FE_FETCH_R                                                   $11, !3, ->27
   16    16    >   INIT_FCALL                                                   'array_combine'
         17        SEND_VAR                                                     !2
         18        INIT_FCALL                                                   'str_getcsv'
         19        SEND_VAR                                                     !3
         20        SEND_VAL                                                     '%3B'
         21        DO_ICALL                                             $13     
         22        SEND_VAR                                                     $13
         23        DO_ICALL                                             $14     
         24        ASSIGN_DIM                                                   !4
         25        OP_DATA                                                      $14
   15    26      > JMP                                                          ->15
         27    >   FE_FREE                                                      $11
   18    28        INIT_FCALL                                                   'json_encode'
         29        SEND_VAR                                                     !4
         30        SEND_VAL                                                     128
         31        DO_ICALL                                             $15     
         32        ECHO                                                         $15
         33      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
226.36 ms | 2277 KiB | 18 Q