3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = ["1:10:12", "2:15:33", "3:12:10"]; $today = strtotime(date("Y-m-d")); foreach ($times as $time){ echo $today - strtotime(strtotime($time)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/GO7qo
function name:  (null)
number of ops:  21
compiled vars:  !0 = $times, !1 = $today, !2 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'strtotime'
          2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'Y-m-d'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    4     8      > FE_RESET_R                                       $7      !0, ->19
          9    > > FE_FETCH_R                                               $7, !2, ->19
    5    10    >   INIT_FCALL                                               'strtotime'
         11        INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                         $9      
         16        SUB                                              ~10     !1, $9
         17        ECHO                                                     ~10
    4    18      > JMP                                                      ->9
         19    >   FE_FREE                                                  $7
    6    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.99 ms | 1386 KiB | 17 Q