3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $date1 = new DateTime('2015-01-01T12:00:00'); $date2 = new DateTime('2015-01-01T12:01:00'); var_dump($date1 < $date2); $date1->setTimezone(new DateTimeZone('UTC')); $date2->setTimezone(new DateTimeZone('EST')); var_dump($date1 < $date2); $date1->getTimestamp(); $date2->getTimestamp(); var_dump($date1 < $date2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1b2ha
function name:  (null)
number of ops:  40
compiled vars:  !0 = $date1, !1 = $date2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    5     3        NEW                                              $3      'DateTime'
          4        SEND_VAL_EX                                              '2015-01-01T12%3A00%3A00'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
    6     7        NEW                                              $6      'DateTime'
          8        SEND_VAL_EX                                              '2015-01-01T12%3A01%3A00'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $6
    8    11        INIT_FCALL                                               'var_dump'
         12        IS_SMALLER                                       ~9      !0, !1
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                                 
   10    15        INIT_METHOD_CALL                                         !0, 'setTimezone'
         16        NEW                                              $11     'DateTimeZone'
         17        SEND_VAL_EX                                              'UTC'
         18        DO_FCALL                                      0          
         19        SEND_VAR_NO_REF_EX                                       $11
         20        DO_FCALL                                      0          
   11    21        INIT_METHOD_CALL                                         !1, 'setTimezone'
         22        NEW                                              $14     'DateTimeZone'
         23        SEND_VAL_EX                                              'EST'
         24        DO_FCALL                                      0          
         25        SEND_VAR_NO_REF_EX                                       $14
         26        DO_FCALL                                      0          
   13    27        INIT_FCALL                                               'var_dump'
         28        IS_SMALLER                                       ~17     !0, !1
         29        SEND_VAL                                                 ~17
         30        DO_ICALL                                                 
   15    31        INIT_METHOD_CALL                                         !0, 'getTimestamp'
         32        DO_FCALL                                      0          
   16    33        INIT_METHOD_CALL                                         !1, 'getTimestamp'
         34        DO_FCALL                                      0          
   18    35        INIT_FCALL                                               'var_dump'
         36        IS_SMALLER                                       ~21     !0, !1
         37        SEND_VAL                                                 ~21
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.97 ms | 1435 KiB | 15 Q