3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_string = "09/19/2016"; $current_date = new DateTime(); $your_date = new DateTime($date_string); // Using objects if ($your_date < $current_date || $_SESSION['role'] == 'Administrator') echo'<li><a href="?page=itRooms&weekId=2">Week 2 - W/C 12/09/2016</li></a>'; echo "\n\n"; // Using timestamps if (strtotime($date_string) < time() || $_SESSION['role'] == 'Administrator') echo'<li><a href="?page=itRooms&weekId=2">Week 2 - W/C 12/09/2016</li></a>'; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 28
Branch analysis from position: 16
Branch analysis from position: 14
filename:       /in/N74G2
function name:  (null)
number of ops:  31
compiled vars:  !0 = $date_string, !1 = $current_date, !2 = $your_date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '09%2F19%2F2016'
    4     1        NEW                                              $4      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    5     4        NEW                                              $7      'DateTime'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $7
    8     8        IS_SMALLER                                       ~10     !2, !1
          9      > JMPNZ_EX                                         ~10     ~10, ->14
         10    >   FETCH_R                      global              ~11     '_SESSION'
         11        FETCH_DIM_R                                      ~12     ~11, 'role'
         12        IS_EQUAL                                         ~13     ~12, 'Administrator'
         13        BOOL                                             ~10     ~13
         14    > > JMPZ                                                     ~10, ->16
    9    15    >   ECHO                                                     '%3Cli%3E%3Ca+href%3D%22%3Fpage%3DitRooms%26weekId%3D2%22%3EWeek+2+-+W%2FC+12%2F09%2F2016%3C%2Fli%3E%3C%2Fa%3E'
   11    16    >   ECHO                                                     '%0A%0A'
   14    17        INIT_FCALL                                               'strtotime'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $14     
         20        INIT_FCALL                                               'time'
         21        DO_ICALL                                         $15     
         22        IS_SMALLER                                       ~16     $14, $15
         23      > JMPNZ_EX                                         ~16     ~16, ->28
         24    >   FETCH_R                      global              ~17     '_SESSION'
         25        FETCH_DIM_R                                      ~18     ~17, 'role'
         26        IS_EQUAL                                         ~19     ~18, 'Administrator'
         27        BOOL                                             ~16     ~19
         28    > > JMPZ                                                     ~16, ->30
   15    29    >   ECHO                                                     '%3Cli%3E%3Ca+href%3D%22%3Fpage%3DitRooms%26weekId%3D2%22%3EWeek+2+-+W%2FC+12%2F09%2F2016%3C%2Fli%3E%3C%2Fa%3E'
   16    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.37 ms | 1069 KiB | 15 Q