3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timezoneExhibitsDST($tzId) { $tz = new DateTimeZone($tzId); $date = new DateTime("now",$tz); var_dump($date); $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/MVNXP
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     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 = 17, Position 2 = 34
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 34
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 33
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/MVNXP
function name:  timezoneExhibitsDST
number of ops:  36
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_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
    7    13        INIT_METHOD_CALL                                         !1, 'getTransitions'
         14        DO_FCALL                                      0  $13     
         15        ASSIGN                                                   !3, $13
    8    16      > FE_RESET_R                                       $15     !3, ->34
         17    > > FE_FETCH_R                                       ~16     $15, !4, ->34
         18    >   ASSIGN                                                   !5, ~16
    9    19        FETCH_DIM_R                                      ~18     !4, 'ts'
         20        INIT_METHOD_CALL                                         !2, 'format'
         21        SEND_VAL_EX                                              'U'
         22        DO_FCALL                                      0  $19     
         23        IS_SMALLER                                               $19, ~18
         24      > JMPZ                                                     ~20, ->33
   10    25    >   INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                                 
   11    28        SUB                                              ~22     !5, 1
         29        FETCH_DIM_R                                      ~23     !3, ~22
         30        FETCH_DIM_R                                      ~24     ~23, 'isdst'
         31        FE_FREE                                                  $15
         32      > RETURN                                                   ~24
    8    33    > > JMP                                                      ->17
         34    >   FE_FREE                                                  $15
   13    35      > RETURN                                                   null

End of function timezoneexhibitsdst

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.52 ms | 1403 KiB | 18 Q