3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => (object) [ "User_id" => "1", "date" => "2076-02-06", "checkedin" => "12:11:40", "checkedout" => "19:11:43", "difference" => "7.00083333", ], 1 => (object) [ "User_id" => "1", "date" => "2076-02-08", "checkedin" => "12:15:40", "checkedout" => "15:15:48", "difference" => "3.00222222", ], ]; $temp = array_sum(array_column($arr, 'difference')); echo $temp;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AefCK
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr, !1 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~2      <array>
          1        INIT_ARRAY                                       ~3      ~2, 0
   11     2        CAST                                          8  ~4      <array>
          3        ADD_ARRAY_ELEMENT                                ~3      ~4, 1
    2     4        ASSIGN                                                   !0, ~3
   19     5        INIT_FCALL                                               'array_sum'
          6        INIT_FCALL                                               'array_column'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'difference'
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
   20    13        ECHO                                                     !1
   21    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.36 ms | 1394 KiB | 17 Q