3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ts = ['3:00', '2:30', '12:15', '12:17']; $s = strtotime('midnight tomorrow')-1; foreach($ts as $t) { $t = strtotime($t); if ($t < $s) { $s = $t; } } var_dump(date('c', $s));
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
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/FIJcl
function name:  (null)
number of ops:  25
compiled vars:  !0 = $ts, !1 = $s, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 'midnight+tomorrow'
          3        DO_ICALL                                         $4      
          4        SUB                                              ~5      $4, 1
          5        ASSIGN                                                   !1, ~5
    7     6      > FE_RESET_R                                       $7      !0, ->16
          7    > > FE_FETCH_R                                               $7, !2, ->16
    8     8    >   INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
    9    12        IS_SMALLER                                               !2, !1
         13      > JMPZ                                                     ~10, ->15
   10    14    >   ASSIGN                                                   !1, !2
    7    15    > > JMP                                                      ->7
         16    >   FE_FREE                                                  $7
   14    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'c'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $12     
         22        SEND_VAR                                                 $12
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.9 ms | 1395 KiB | 19 Q