3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original_timezone = new DateTimeZone('UTC'); $datetime = new DateTime('06-01-2016 19:00 UTC', $original_timezone); $target_timezone = new DateTimeZone('EDT'); $datetime->setTimeZone($target_timezone); $triggerOn = $datetime->format('Y-m-d h:i:s T'); echo $triggerOn; echo timezone_offset_get($triggerOn);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DOluB
function name:  (null)
number of ops:  26
compiled vars:  !0 = $original_timezone, !1 = $datetime, !2 = $target_timezone, !3 = $triggerOn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTimeZone'
          1        SEND_VAL_EX                                              'UTC'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        NEW                                              $7      'DateTime'
          5        SEND_VAL_EX                                              '06-01-2016+19%3A00+UTC'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $7
    5     9        NEW                                              $10     'DateTimeZone'
         10        SEND_VAL_EX                                              'EDT'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $10
    6    13        INIT_METHOD_CALL                                         !1, 'setTimeZone'
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0          
    7    16        INIT_METHOD_CALL                                         !1, 'format'
         17        SEND_VAL_EX                                              'Y-m-d+h%3Ai%3As+T'
         18        DO_FCALL                                      0  $14     
         19        ASSIGN                                                   !3, $14
    8    20        ECHO                                                     !3
    9    21        INIT_FCALL                                               'timezone_offset_get'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                         $16     
         24        ECHO                                                     $16
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.54 ms | 1395 KiB | 15 Q