3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_set = date("Y-m-d",strtotime( '10-12-2024')); // $date_now = date("d-m-Y"); // this format is string comparable if ($date_set > '2024-12-20') { echo 'greater than'; }else{ echo 'Less than'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/asqs6
function name:  (null)
number of ops:  14
compiled vars:  !0 = $date_set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m-d'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '10-12-2024'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    9     8        IS_SMALLER                                               '2024-12-20', !0
          9      > JMPZ                                                     ~4, ->12
   10    10    >   ECHO                                                     'greater+than'
    9    11      > JMP                                                      ->13
   12    12    >   ECHO                                                     'Less+than'
   13    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.05 ms | 1459 KiB | 15 Q