3v4l.org

run code in 300+ PHP versions simultaneously
<?php $local = new DateTimeZone('America/Los_Angeles'); $totSecs = $local->getOffset(new DateTime()); $totSecs -= .5 * 3600; $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/k6M3X
function name:  (null)
number of ops:  28
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        ASSIGN_OP                                     2          !1, 1800
    5    11        INIT_FCALL                                               'floor'
         12        DIV                                              ~12     !1, 3600
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !2, $13
    6    16        INIT_FCALL                                               'floor'
         17        MUL                                              ~15     !2, 60
         18        MUL                                              ~16     ~15, 60
         19        SUB                                              ~17     !1, ~16
         20        DIV                                              ~18     ~17, 60
         21        SEND_VAL                                                 ~18
         22        DO_ICALL                                         $19     
         23        ASSIGN                                                   !3, $19
    7    24        CONCAT                                           ~21     !2, '%3A'
         25        CONCAT                                           ~22     ~21, !3
         26        ECHO                                                     ~22
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.07 ms | 1395 KiB | 15 Q