3v4l.org

run code in 300+ PHP versions simultaneously
<?php $theTime = time(); // specific date/time we're checking, in epoch seconds. $tz = new DateTimeZone('America/Los_Angeles'); $transition = $tz->getTransitions($theTime, $theTime); // only one array should be returned into $transition. Now get the data: $offset = $transition[0]['offset']; $abbr = $transition[0]['abbr'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cXa4
function name:  (null)
number of ops:  19
compiled vars:  !0 = $theTime, !1 = $tz, !2 = $transition, !3 = $offset, !4 = $abbr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $5      
          2        ASSIGN                                                   !0, $5
    6     3        NEW                                              $7      'DateTimeZone'
          4        SEND_VAL_EX                                              'America%2FLos_Angeles'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    7     7        INIT_METHOD_CALL                                         !1, 'getTransitions'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
   10    12        FETCH_DIM_R                                      ~12     !2, 0
         13        FETCH_DIM_R                                      ~13     ~12, 'offset'
         14        ASSIGN                                                   !3, ~13
   11    15        FETCH_DIM_R                                      ~15     !2, 0
         16        FETCH_DIM_R                                      ~16     ~15, 'abbr'
         17        ASSIGN                                                   !4, ~16
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.5 ms | 1394 KiB | 15 Q