3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timezones = [ '+01:00', '+01:45', '+01:45:30' ]; $now = new DateTimeImmutable(); foreach ($timezones as $timezone) { $dtz = new DatetimeZone($timezone); echo $dtz->getName(), ', ', $dtz->getOffset($now), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/fFpgU
function name:  (null)
number of ops:  22
compiled vars:  !0 = $timezones, !1 = $now, !2 = $timezone, !3 = $dtz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        NEW                                              $5      'DateTimeImmutable'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
   10     4      > FE_RESET_R                                       $8      !0, ->20
          5    > > FE_FETCH_R                                               $8, !2, ->20
   11     6    >   NEW                                              $9      'DatetimeZone'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $9
   12    10        INIT_METHOD_CALL                                         !3, 'getName'
         11        DO_FCALL                                      0  $12     
         12        ECHO                                                     $12
         13        ECHO                                                     '%2C+'
         14        INIT_METHOD_CALL                                         !3, 'getOffset'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $13     
         17        ECHO                                                     $13
         18        ECHO                                                     '%0A'
   10    19      > JMP                                                      ->5
         20    >   FE_FREE                                                  $8
   13    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.5 ms | 1423 KiB | 13 Q