3v4l.org

run code in 300+ PHP versions simultaneously
<?php $punchInTimes = array( '2013-08-01 09:00', '2013-08-02 09:06', '2013-08-03 08:50', '2013-08-04 09:20', '2013-08-05 09:01', '2013-08-06 08:56', ); echo date('H:i', array_sum(array_map(function($v) { $time = date("H:i", strtotime($v)); return strtotime($time); }, $punchInTimes)) / count($punchInTimes));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JTnXT
function name:  (null)
number of ops:  17
compiled vars:  !0 = $punchInTimes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'H%3Ai'
          3        INIT_FCALL                                               'array_sum'
          4        INIT_FCALL                                               'array_map'
          5        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   15     6        SEND_VAL                                                 ~2
          7        SEND_VAR                                                 !0
   12     8        DO_ICALL                                         $3      
   15     9        SEND_VAR                                                 $3
   12    10        DO_ICALL                                         $4      
   15    11        COUNT                                            ~5      !0
         12        DIV                                              ~6      $4, ~5
         13        SEND_VAL                                                 ~6
   12    14        DO_ICALL                                         $7      
   15    15        ECHO                                                     $7
         16      > 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/JTnXT
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $v, !1 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'H%3Ai'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !1, $3
   14     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $5      
         12      > RETURN                                                   $5
   15    13*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.43 ms | 1014 KiB | 17 Q