3v4l.org

run code in 300+ PHP versions simultaneously
<?php define( 'MINUTE_IN_SECONDS', 60 ); define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS ); define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS ); define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS ); define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS ); function test( $date ) { $reminder_time = strtotime( str_replace( '-', ' ', $date ) . ', 2015' ); $reminder_time = $reminder_time - ( DAY_IN_SECONDS ); var_dump( ( time() >= $reminder_time ) ); } test( 'nov-21' ); test( 'dec-23' ); test( 'dec-24' ); test( 'dec-25' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4RbUP
function name:  (null)
number of ops:  41
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'MINUTE_IN_SECONDS'
          2        SEND_VAL                                                 60
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'HOUR_IN_SECONDS'
          6        FETCH_CONSTANT                                   ~1      'MINUTE_IN_SECONDS'
          7        MUL                                              ~2      ~1, 60
          8        SEND_VAL                                                 ~2
          9        DO_ICALL                                                 
    4    10        INIT_FCALL                                               'define'
         11        SEND_VAL                                                 'DAY_IN_SECONDS'
         12        FETCH_CONSTANT                                   ~4      'HOUR_IN_SECONDS'
         13        MUL                                              ~5      ~4, 24
         14        SEND_VAL                                                 ~5
         15        DO_ICALL                                                 
    5    16        INIT_FCALL                                               'define'
         17        SEND_VAL                                                 'WEEK_IN_SECONDS'
         18        FETCH_CONSTANT                                   ~7      'DAY_IN_SECONDS'
         19        MUL                                              ~8      ~7, 7
         20        SEND_VAL                                                 ~8
         21        DO_ICALL                                                 
    6    22        INIT_FCALL                                               'define'
         23        SEND_VAL                                                 'YEAR_IN_SECONDS'
         24        FETCH_CONSTANT                                   ~10     'DAY_IN_SECONDS'
         25        MUL                                              ~11     ~10, 365
         26        SEND_VAL                                                 ~11
         27        DO_ICALL                                                 
   15    28        INIT_FCALL                                               'test'
         29        SEND_VAL                                                 'nov-21'
         30        DO_FCALL                                      0          
   16    31        INIT_FCALL                                               'test'
         32        SEND_VAL                                                 'dec-23'
         33        DO_FCALL                                      0          
   17    34        INIT_FCALL                                               'test'
         35        SEND_VAL                                                 'dec-24'
         36        DO_FCALL                                      0          
   18    37        INIT_FCALL                                               'test'
         38        SEND_VAL                                                 'dec-25'
         39        DO_FCALL                                      0          
         40      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4RbUP
function name:  test
number of ops:  21
compiled vars:  !0 = $date, !1 = $reminder_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'strtotime'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '-'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        CONCAT                                           ~3      $2, '%2C+2015'
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
   10    11        FETCH_CONSTANT                                   ~6      'DAY_IN_SECONDS'
         12        SUB                                              ~7      !1, ~6
         13        ASSIGN                                                   !1, ~7
   12    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'time'
         16        DO_ICALL                                         $9      
         17        IS_SMALLER_OR_EQUAL                              ~10     !1, $9
         18        SEND_VAL                                                 ~10
         19        DO_ICALL                                                 
   13    20      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.65 ms | 1403 KiB | 27 Q