3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$csv = file("filename.csv"); $csv = ['"9.30 AM"', '"Username"', '"Message"', '""', '"9.30 AM"', '"Username"', '"Message"', '""']; $messages = array_chunk($csv, 4); foreach($messages as $mess){ list($time, $user, $m) = array_map(function ($a) { return trim($a, '"'); }, $mess); echo $time . " " . $user . " " . $m . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 27
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/alctq
function name:  (null)
number of ops:  29
compiled vars:  !0 = $csv, !1 = $messages, !2 = $mess, !3 = $time, !4 = $user, !5 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'array_chunk'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 4
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
   15     6      > FE_RESET_R                                       $9      !1, ->27
          7    > > FE_FETCH_R                                               $9, !2, ->27
   16     8    >   INIT_FCALL                                               'array_map'
          9        DECLARE_LAMBDA_FUNCTION                          ~10     [0]
         10        SEND_VAL                                                 ~10
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $11     
         13        FETCH_LIST_R                                     $12     $11, 0
         14        ASSIGN                                                   !3, $12
         15        FETCH_LIST_R                                     $14     $11, 1
         16        ASSIGN                                                   !4, $14
         17        FETCH_LIST_R                                     $16     $11, 2
         18        ASSIGN                                                   !5, $16
         19        FREE                                                     $11
   17    20        CONCAT                                           ~18     !3, '+'
         21        CONCAT                                           ~19     ~18, !4
         22        CONCAT                                           ~20     ~19, '+'
         23        CONCAT                                           ~21     ~20, !5
         24        CONCAT                                           ~22     ~21, '%0A'
         25        ECHO                                                     ~22
   15    26      > JMP                                                      ->7
         27    >   FE_FREE                                                  $9
   18    28      > 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/alctq
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%22'
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
285.89 ms | 1017 KiB | 16 Q