3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timezoneExhibitsDST($tzId) { $tz = new DateTimeZone($tzId); $date = new DateTime("now",$tz); $trans = $tz->getTransitions(); foreach ($trans as $k => $t) if ($t["ts"] > $date->format('U')) { print_r($t); return $trans[$k-1]['isdst']; } } var_dump(timezoneExhibitsDST("Europe/London"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oakvd
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'timezoneexhibitsdst'
          2        SEND_VAL                                                 'Europe%2FLondon'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function timezoneexhibitsdst:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 31
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 31
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/oakvd
function name:  timezoneExhibitsDST
number of ops:  33
compiled vars:  !0 = $tzId, !1 = $tz, !2 = $date, !3 = $trans, !4 = $t, !5 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        NEW                                              $6      'DateTimeZone'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $6
    5     5        NEW                                              $9      'DateTime'
          6        SEND_VAL_EX                                              'now'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $9
    6    10        INIT_METHOD_CALL                                         !1, 'getTransitions'
         11        DO_FCALL                                      0  $12     
         12        ASSIGN                                                   !3, $12
    7    13      > FE_RESET_R                                       $14     !3, ->31
         14    > > FE_FETCH_R                                       ~15     $14, !4, ->31
         15    >   ASSIGN                                                   !5, ~15
    8    16        FETCH_DIM_R                                      ~17     !4, 'ts'
         17        INIT_METHOD_CALL                                         !2, 'format'
         18        SEND_VAL_EX                                              'U'
         19        DO_FCALL                                      0  $18     
         20        IS_SMALLER                                               $18, ~17
         21      > JMPZ                                                     ~19, ->30
    9    22    >   INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
   10    25        SUB                                              ~21     !5, 1
         26        FETCH_DIM_R                                      ~22     !3, ~21
         27        FETCH_DIM_R                                      ~23     ~22, 'isdst'
         28        FE_FREE                                                  $14
         29      > RETURN                                                   ~23
    7    30    > > JMP                                                      ->14
         31    >   FE_FREE                                                  $14
   12    32      > RETURN                                                   null

End of function timezoneexhibitsdst

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.61 ms | 1403 KiB | 18 Q