3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/London'); $now = new DateTime; $utc = clone $now; $now->setTimezone(new DateTimeZone('UTC')); var_dump($utc->format('U') == $now->format('U'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H4d95
function name:  (null)
number of ops:  25
compiled vars:  !0 = $now, !1 = $utc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Europe%2FLondon'
          2        DO_ICALL                                                 
    3     3        NEW                                              $3      'DateTime'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
    4     6        CLONE                                            ~6      !0
          7        ASSIGN                                                   !1, ~6
    5     8        INIT_METHOD_CALL                                         !0, 'setTimezone'
          9        NEW                                              $8      'DateTimeZone'
         10        SEND_VAL_EX                                              'UTC'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $8
         13        DO_FCALL                                      0          
    7    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'format'
         16        SEND_VAL_EX                                              'U'
         17        DO_FCALL                                      0  $11     
         18        INIT_METHOD_CALL                                         !0, 'format'
         19        SEND_VAL_EX                                              'U'
         20        DO_FCALL                                      0  $12     
         21        IS_EQUAL                                         ~13     $11, $12
         22        SEND_VAL                                                 ~13
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.48 ms | 1399 KiB | 17 Q