3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_timezone = new DateTimeZone("Europe/London"); $server_timezone = new DateTimeZone("America/New_York"); $my_date = new DateTime("now", $my_timezone); $server_date = new DateTime("now", $server_timezone); $my_offset = $my_timezone->getOffset($my_date); $server_offset = $server_timezone->getOffset($server_date); echo "[my: $my_offset][srv: $server_offset]";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ekXsu
function name:  (null)
number of ops:  33
compiled vars:  !0 = $my_timezone, !1 = $server_timezone, !2 = $my_date, !3 = $server_date, !4 = $my_offset, !5 = $server_offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $6      'DateTimeZone'
          1        SEND_VAL_EX                                              'Europe%2FLondon'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $6
    3     4        NEW                                              $9      'DateTimeZone'
          5        SEND_VAL_EX                                              'America%2FNew_York'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $9
    5     8        NEW                                              $12     'DateTime'
          9        SEND_VAL_EX                                              'now'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $12
    6    13        NEW                                              $15     'DateTime'
         14        SEND_VAL_EX                                              'now'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $15
    8    18        INIT_METHOD_CALL                                         !0, 'getOffset'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0  $18     
         21        ASSIGN                                                   !4, $18
    9    22        INIT_METHOD_CALL                                         !1, 'getOffset'
         23        SEND_VAR_EX                                              !3
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !5, $20
   11    26        ROPE_INIT                                     5  ~23     '%5Bmy%3A+'
         27        ROPE_ADD                                      1  ~23     ~23, !4
         28        ROPE_ADD                                      2  ~23     ~23, '%5D%5Bsrv%3A+'
         29        ROPE_ADD                                      3  ~23     ~23, !5
         30        ROPE_END                                      4  ~22     ~23, '%5D'
         31        ECHO                                                     ~22
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.51 ms | 1395 KiB | 13 Q