3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateTimeZoneMoscow = new DateTimeZone("Europe/Moscow"); $dateTimeZonePrague = new DateTimeZone("Europe/Prague"); $dateTimeMoscow = new DateTime("now", $dateTimeZoneMoscow); $dateTimePrague = new DateTime("now", $dateTimeZonePrague); $timeOffset = $dateTimeZonePrague->getOffset($dateTimeMoscow); var_dump($timeOffset);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lQqS
function name:  (null)
number of ops:  26
compiled vars:  !0 = $dateTimeZoneMoscow, !1 = $dateTimeZonePrague, !2 = $dateTimeMoscow, !3 = $dateTimePrague, !4 = $timeOffset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DateTimeZone'
          1        SEND_VAL_EX                                              'Europe%2FMoscow'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        NEW                                              $8      'DateTimeZone'
          5        SEND_VAL_EX                                              'Europe%2FPrague'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    5     8        NEW                                              $11     'DateTime'
          9        SEND_VAL_EX                                              'now'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $11
    6    13        NEW                                              $14     'DateTime'
         14        SEND_VAL_EX                                              'now'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $14
    8    18        INIT_METHOD_CALL                                         !1, 'getOffset'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0  $17     
         21        ASSIGN                                                   !4, $17
   11    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.09 ms | 943 KiB | 16 Q