3v4l.org

run code in 300+ PHP versions simultaneously
<?php $local = new DateTimeZone('America/Los_Angeles'); $totSecs = $local->getOffset(new DateTime()); $hrs = floor($totSecs / (60 * 60)); $mins = floor(($totSecs - $hrs * 60 * 60) / 60); echo $hrs . ':' . $mins;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b6Thu
function name:  (null)
number of ops:  27
compiled vars:  !0 = $local, !1 = $totSecs, !2 = $hrs, !3 = $mins
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTimeZone'
          1        SEND_VAL_EX                                              'America%2FLos_Angeles'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        INIT_METHOD_CALL                                         !0, 'getOffset'
          5        NEW                                              $7      'DateTime'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $7
          8        DO_FCALL                                      0  $9      
          9        ASSIGN                                                   !1, $9
    4    10        INIT_FCALL                                               'floor'
         11        DIV                                              ~11     !1, 3600
         12        SEND_VAL                                                 ~11
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !2, $12
    5    15        INIT_FCALL                                               'floor'
         16        MUL                                              ~14     !2, 60
         17        MUL                                              ~15     ~14, 60
         18        SUB                                              ~16     !1, ~15
         19        DIV                                              ~17     ~16, 60
         20        SEND_VAL                                                 ~17
         21        DO_ICALL                                         $18     
         22        ASSIGN                                                   !3, $18
    6    23        CONCAT                                           ~20     !2, '%3A'
         24        CONCAT                                           ~21     ~20, !3
         25        ECHO                                                     ~21
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.91 ms | 1395 KiB | 15 Q