3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timezoneExhibitsDST($tzId) { $tz = new DateTimeZone($tzId); $date = new DateTime("now",$tz); return $date->format('I'); /*$trans = $tz->getTransitions(); foreach ($trans as $k => $t) if ($t["ts"] > $date->format('U')) { print_r($t); print_r($trans[$k-1]); 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/X0nef
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X0nef
function name:  timezoneExhibitsDST
number of ops:  15
compiled vars:  !0 = $tzId, !1 = $tz, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        NEW                                              $3      'DateTimeZone'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    5     5        NEW                                              $6      'DateTime'
          6        SEND_VAL_EX                                              'now'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $6
    6    10        INIT_METHOD_CALL                                         !2, 'format'
         11        SEND_VAL_EX                                              'I'
         12        DO_FCALL                                      0  $9      
         13      > RETURN                                                   $9
   14    14*     > RETURN                                                   null

End of function timezoneexhibitsdst

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.65 ms | 1398 KiB | 16 Q