3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dateValues = ["Sunday 21st October 2018", "Monday 1st October 2018"]; $dtLimit = new \DateTime("-14 days, midnight"); foreach ($dateValues as $dateValue) { $dtCompare = DateTime::createFromFormat("!l jS F Y", $dateValue); var_dump($dtCompare < $dtLimit); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/MFmoN
function name:  (null)
number of ops:  19
compiled vars:  !0 = $dateValues, !1 = $dtLimit, !2 = $dateValue, !3 = $dtCompare
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        NEW                                                  $5      'DateTime'
          2        SEND_VAL_EX                                                  '-14+days%2C+midnight'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $5
    4     5      > FE_RESET_R                                           $8      !0, ->17
          6    > > FE_FETCH_R                                                   $8, !2, ->17
    5     7    >   INIT_STATIC_METHOD_CALL                                      'DateTime', 'createFromFormat'
          8        SEND_VAL                                                     '%21l+jS+F+Y'
          9        SEND_VAR                                                     !2
         10        DO_FCALL                                          0  $9      
         11        ASSIGN                                                       !3, $9
    6    12        INIT_FCALL                                                   'var_dump'
         13        IS_SMALLER                                           ~11     !3, !1
         14        SEND_VAL                                                     ~11
         15        DO_ICALL                                                     
    4    16      > JMP                                                          ->6
         17    >   FE_FREE                                                      $8
    7    18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.63 ms | 2062 KiB | 13 Q