3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); foreach (['CEST', 'CET', 'Europe/Amsterdam'] as $tzIdentifier) { $tz = new DateTimeZone($tzIdentifier); var_dump([$tzIdentifier, $tz->getName(), $tz->getOffset, $tz->getLocation]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/LdQSc
function name:  (null)
number of ops:  23
compiled vars:  !0 = $tzIdentifier, !1 = $tz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    5     3      > FE_RESET_R                                       $3      <array>, ->21
          4    > > FE_FETCH_R                                               $3, !0, ->21
    7     5    >   NEW                                              $4      'DateTimeZone'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $4
    8     9        INIT_FCALL                                               'var_dump'
         10        INIT_ARRAY                                       ~7      !0
         11        INIT_METHOD_CALL                                         !1, 'getName'
         12        DO_FCALL                                      0  $8      
         13        ADD_ARRAY_ELEMENT                                ~7      $8
         14        FETCH_OBJ_R                                      ~9      !1, 'getOffset'
         15        ADD_ARRAY_ELEMENT                                ~7      ~9
         16        FETCH_OBJ_R                                      ~10     !1, 'getLocation'
         17        ADD_ARRAY_ELEMENT                                ~7      ~10
         18        SEND_VAL                                                 ~7
         19        DO_ICALL                                                 
    5    20      > JMP                                                      ->4
         21    >   FE_FREE                                                  $3
    9    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.5 ms | 1395 KiB | 17 Q