3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month = $dateParts[0]; $day = $dateParts[1]; $year = $dateParts[2]; $dateString = $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 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/90diS
function name:  (null)
number of ops:  22
compiled vars:  !0 = $month, !1 = $dateParts, !2 = $day, !3 = $year, !4 = $dateString, !5 = $exp, !6 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_DIM_R                                      ~7      !1, 0
          1        ASSIGN                                                   !0, ~7
    4     2        FETCH_DIM_R                                      ~9      !1, 1
          3        ASSIGN                                                   !2, ~9
    5     4        FETCH_DIM_R                                      ~11     !1, 2
          5        ASSIGN                                                   !3, ~11
    6     6        CONCAT                                           ~13     !0, !2
          7        CONCAT                                           ~14     ~13, !3
          8        ASSIGN                                                   !4, ~14
    7     9        NEW                                              $16     'DateTime'
         10        SEND_VAR_EX                                              !4
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !5, $16
    8    13        NEW                                              $19     'DateTime'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !6, $19
   10    16        IS_SMALLER                                               !5, !6
         17      > JMPZ                                                     ~22, ->20
   11    18    >   ECHO                                                     'in+future'
         19      > JMP                                                      ->21
   13    20    >   ECHO                                                     'in+past'
         21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.11 ms | 1394 KiB | 13 Q