3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = ["00:10:12" ]; $today = strtotime(date("Y-m-d")); $intervals = array_map(function($a) use ($today){ return strtotime($a) - $today;}, $times); echo array_sum($intervals)." Seconds";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Gdh2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $times, !1 = $today, !2 = $intervals
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        INIT_FCALL                                               'array_map'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9Gdh2%3A4%240'
         10        BIND_LEXICAL                                             ~7, !1
         11        SEND_VAL                                                 ~7
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
    5    15        INIT_FCALL                                               'array_sum'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        CONCAT                                           ~11     $10, '+Seconds'
         19        ECHO                                                     ~11
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9Gdh2%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Gdh2
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $a, !1 = $today
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        SUB                                              ~3      $2, !1
          6      > RETURN                                                   ~3
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9Gdh2%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.23 ms | 1396 KiB | 21 Q