3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new \DateTime('now'); $currentMonth = $now->format('n'); echo $currentMonth; $today = date('Y-n-j'); $last1 = "2021-11-1"; if($today > strtotime($last1)) echo 'true';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/Xi8Av
function name:  (null)
number of ops:  21
compiled vars:  !0 = $now, !1 = $currentMonth, !2 = $today, !3 = $last1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              'now'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        INIT_METHOD_CALL                                         !0, 'format'
          5        SEND_VAL_EX                                              'n'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    4     8        ECHO                                                     !1
    5     9        INIT_FCALL                                               'date'
         10        SEND_VAL                                                 'Y-n-j'
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    6    13        ASSIGN                                                   !3, '2021-11-1'
    7    14        INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $12     
         17        IS_SMALLER                                               $12, !2
         18      > JMPZ                                                     ~13, ->20
    8    19    >   ECHO                                                     'true'
         20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.95 ms | 1399 KiB | 17 Q