3v4l.org

run code in 500+ PHP versions simultaneously
<?php $datetime1 = DateTime::createFromFormat('d/m/Y','18/10/2018'); $datetime2 = DateTime::createFromFormat('d/m/Y','20/10/2018'); if($datetime1 > $datetime2){ echo 'datetime1 greater than datetime2'; } else { echo 'datetime2 greater than datetime1'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5hYBP
function name:  (null)
number of ops:  16
compiled vars:  !0 = $datetime1, !1 = $datetime2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_STATIC_METHOD_CALL                                      'DateTime', 'createFromFormat'
          1        SEND_VAL                                                     'd%2Fm%2FY'
          2        SEND_VAL                                                     '18%2F10%2F2018'
          3        DO_FCALL                                          0  $2      
          4        ASSIGN                                                       !0, $2
    3     5        INIT_STATIC_METHOD_CALL                                      'DateTime', 'createFromFormat'
          6        SEND_VAL                                                     'd%2Fm%2FY'
          7        SEND_VAL                                                     '20%2F10%2F2018'
          8        DO_FCALL                                          0  $4      
          9        ASSIGN                                                       !1, $4
    5    10        IS_SMALLER                                                   !1, !0
         11      > JMPZ                                                         ~6, ->14
    6    12    >   ECHO                                                         'datetime1+greater+than+datetime2'
    5    13      > JMP                                                          ->15
    8    14    >   ECHO                                                         'datetime2+greater+than+datetime1'
   10    15    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.56 ms | 2102 KiB | 13 Q