3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month = 05; $day = 07; $year = 2014; $dateString = sprintf("%u/%u/%u", $month, $day, $year); $exp = new DateTime($dateString); $now = new DateTime(); if ( $exp > $now ) echo "in future"; else echo "in past";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5GMO
function name:  (null)
number of ops:  23
compiled vars:  !0 = $month, !1 = $day, !2 = $year, !3 = $dateString, !4 = $exp, !5 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 5
    4     1        ASSIGN                                                   !1, 7
    5     2        ASSIGN                                                   !2, 2014
    6     3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 '%25u%2F%25u%2F%25u'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !3, $9
    7    10        NEW                                              $11     'DateTime'
         11        SEND_VAR_EX                                              !3
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !4, $11
    8    14        NEW                                              $14     'DateTime'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !5, $14
   10    17        IS_SMALLER                                               !5, !4
         18      > JMPZ                                                     ~17, ->21
   11    19    >   ECHO                                                     'in+future'
         20      > JMP                                                      ->22
   13    21    >   ECHO                                                     'in+past'
         22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.63 ms | 1395 KiB | 15 Q