3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( '1/10/2014', '1/11/2014', '1/12/2014', '1/13/2014', '1/14/2014' ); foreach ($array as $date) { $unixdate = strtotime($date); if ($unixdate < time()) { unset($array[$date]); } } print_r($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 13
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/JeS1K
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $date, !2 = $unixdate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $4      !0, ->13
          2    > > FE_FETCH_R                                               $4, !1, ->13
   13     3    >   INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   15     7        INIT_FCALL                                               'time'
          8        DO_ICALL                                         $7      
          9        IS_SMALLER                                               !2, $7
         10      > JMPZ                                                     ~8, ->12
   17    11    >   UNSET_DIM                                                !0, !1
   11    12    > > JMP                                                      ->2
         13    >   FE_FREE                                                  $4
   23    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.72 ms | 1395 KiB | 19 Q