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")); $intervals = array_map(function($a) use ($today){ return $today - strtotime($a);}, $times); print_r($intervals);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rKo7B
function name:  (null)
number of ops:  19
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%2FrKo7B%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                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FrKo7B%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rKo7B
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      !1, $2
          6      > RETURN                                                   ~3
          7*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.34 ms | 1401 KiB | 21 Q