3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_date= DateTime::createFromFormat('d/m/y', "08/02/2015"); $todays_date = new DateTime(); if($test_date < $todays_date){ echo "Past"; } else { echo "Future"; }
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/WJKS9
function name:  (null)
number of ops:  14
compiled vars:  !0 = $test_date, !1 = $todays_date
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                                                 '08%2F02%2F2015'
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
    3     5        NEW                                              $4      'DateTime'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
    5     8        IS_SMALLER                                               !0, !1
          9      > JMPZ                                                     ~7, ->12
    6    10    >   ECHO                                                     'Past'
         11      > JMP                                                      ->13
    8    12    >   ECHO                                                     'Future'
    9    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.84 ms | 1393 KiB | 13 Q