3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone("Pacific/Chatham"); $utcNow = new DateTimeImmutable("now", new DateTimeZone("UTC")); var_dump($tz->getOffset($utcNow)/3600);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/unXAd
function name:  (null)
number of ops:  20
compiled vars:  !0 = $tz, !1 = $utcNow
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTimeZone'
          1        SEND_VAL_EX                                              'Pacific%2FChatham'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        NEW                                              $5      'DateTimeImmutable'
          5        SEND_VAL_EX                                              'now'
          6        NEW                                              $6      'DateTimeZone'
          7        SEND_VAL_EX                                              'UTC'
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $6
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
    5    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !0, 'getOffset'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $10     
         16        DIV                                              ~11     $10, 3600
         17        SEND_VAL                                                 ~11
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.71 ms | 1395 KiB | 15 Q