3v4l.org

run code in 500+ PHP versions simultaneously
<?php date_default_timezone_set('Australia/Melbourne'); $ref = strtotime('2019-04-07T01:00:00+1100'); echo 'Reference: ', date('r', $ref), PHP_EOL; echo 'Plus 2 days: ', date('r', strtotime('+2 days', $ref)), PHP_EOL; echo 'Plus 48 hours: ', date('r', strtotime('+48 hours', $ref)), PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O6MTd
function name:  (null)
number of ops:  37
compiled vars:  !0 = $ref
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'date_default_timezone_set'
          1        SEND_VAL                                                     'Australia%2FMelbourne'
          2        DO_ICALL                                                     
    4     3        INIT_FCALL                                                   'strtotime'
          4        SEND_VAL                                                     '2019-04-07T01%3A00%3A00%2B1100'
          5        DO_ICALL                                             $2      
          6        ASSIGN                                                       !0, $2
    6     7        ECHO                                                         'Reference%3A+++++'
          8        INIT_FCALL                                                   'date'
          9        SEND_VAL                                                     'r'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                             $4      
         12        ECHO                                                         $4
         13        ECHO                                                         '%0A'
    7    14        ECHO                                                         'Plus+2+days%3A+++'
         15        INIT_FCALL                                                   'date'
         16        SEND_VAL                                                     'r'
         17        INIT_FCALL                                                   'strtotime'
         18        SEND_VAL                                                     '%2B2+days'
         19        SEND_VAR                                                     !0
         20        DO_ICALL                                             $5      
         21        SEND_VAR                                                     $5
         22        DO_ICALL                                             $6      
         23        ECHO                                                         $6
         24        ECHO                                                         '%0A'
    8    25        ECHO                                                         'Plus+48+hours%3A+'
         26        INIT_FCALL                                                   'date'
         27        SEND_VAL                                                     'r'
         28        INIT_FCALL                                                   'strtotime'
         29        SEND_VAL                                                     '%2B48+hours'
         30        SEND_VAR                                                     !0
         31        DO_ICALL                                             $7      
         32        SEND_VAR                                                     $7
         33        DO_ICALL                                             $8      
         34        ECHO                                                         $8
         35        ECHO                                                         '%0A'
    9    36      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.03 ms | 481 KiB | 10 Q