3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = array('01:00:00','02:20:00','04:00','05:10'); $sum = strtotime('00:00:00'); $sum2=0; foreach ($total as $v){ $sum1=strtotime($v)-$sum; $sum2 = $sum2+$sum1; } $sum3=$sum+$sum2; echo date("H:i:s",$sum3);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/QDiVc
function name:  (null)
number of ops:  25
compiled vars:  !0 = $total, !1 = $sum, !2 = $sum2, !3 = $v, !4 = $sum1, !5 = $sum3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 '00%3A00%3A00'
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    4     5        ASSIGN                                                   !2, 0
    5     6      > FE_RESET_R                                       $10     !0, ->16
          7    > > FE_FETCH_R                                               $10, !3, ->16
    7     8    >   INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $11     
         11        SUB                                              ~12     $11, !1
         12        ASSIGN                                                   !4, ~12
    9    13        ADD                                              ~14     !2, !4
         14        ASSIGN                                                   !2, ~14
    5    15      > JMP                                                      ->7
         16    >   FE_FREE                                                  $10
   12    17        ADD                                              ~16     !1, !2
         18        ASSIGN                                                   !5, ~16
   14    19        INIT_FCALL                                               'date'
         20        SEND_VAL                                                 'H%3Ai%3As'
         21        SEND_VAR                                                 !5
         22        DO_ICALL                                         $18     
         23        ECHO                                                     $18
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.67 ms | 1438 KiB | 15 Q