3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zone=new DateTimeZone("MDT"); $o1=$zone->getOffset(new DateTime("2012-01-01",$zone))/3600; $o2=$zone->getOffset(new DateTime("2012-08-01",$zone))/3600; echo "2012-01-01: ".($o1==-7?"Pass":"Fail ($o1)")."\n"; echo "2012-08-01: ".($o2==-6?"Pass":"Fail ($o2)")."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
Branch analysis from position: 37
filename:       /in/M7YiI
function name:  (null)
number of ops:  45
compiled vars:  !0 = $zone, !1 = $o1, !2 = $o2
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NEW                                              $3      :85
         1        SEND_VAL_EX                                              'MDT'
         2        DO_FCALL                                      0          
         3        QM_ASSIGN                                                !0
   4     4        INIT_METHOD_CALL                                         !0, 'getOffset'
         5        NEW                                              $6      :80
         6        SEND_VAL_EX                                              '2012-01-01'
         7        SEND_VAR_EX                                              !0
         8        DO_FCALL                                      0          
         9        SEND_VAR_NO_REF_EX                                       $6
        10        DO_FCALL                                      0  $8      
        11        DIV                                              ~9      $8, 3600
        12        QM_ASSIGN                                                !1
   5    13        INIT_METHOD_CALL                                         !0, 'getOffset'
        14        NEW                                              $11     :68
        15        SEND_VAL_EX                                              '2012-08-01'
        16        SEND_VAR_EX                                              !0
        17        DO_FCALL                                      0          
        18        SEND_VAR_NO_REF_EX                                       $11
        19        DO_FCALL                                      0  $13     
        20        DIV                                              ~14     $13, 3600
        21        QM_ASSIGN                                                !2
   6    22        IS_NOT_EQUAL                                     ~16     !1, -7
        23      > JMPZ                                                     ~16, ->26
        24    >   ASSIGN_BW_OR                                  0  ~17     'Pass'
        25      > JMP                                                      ->30
        26    >   ROPE_INIT                                     3  ~19     'Fail+%28'
        27        ROPE_ADD                                      1  ~19     ~19, !1
        28        ROPE_END                                      2  ~18     ~19, '%29'
        29        ASSIGN_BW_OR                                  0  ~17     ~18
        30    >   CONCAT                                           ~21     '2012-01-01%3A+', ~17
        31        CONCAT                                           ~22     ~21, '%0A'
        32        ASSIGN_OBJ                                               ~22
   7    33        IS_NOT_EQUAL                                     ~23     !2, -6
        34      > JMPZ                                                     ~23, ->37
        35    >   ASSIGN_BW_OR                                  0  ~24     'Pass'
        36      > JMP                                                      ->41
        37    >   ROPE_INIT                                     3  ~26     'Fail+%28'
        38        ROPE_ADD                                      1  ~26     ~26, !2
        39        ROPE_END                                      2  ~25     ~26, '%29'
        40        ASSIGN_BW_OR                                  0  ~24     ~25
        41    >   CONCAT                                           ~28     '2012-08-01%3A+', ~24
        42        CONCAT                                           ~29     ~28, '%0A'
        43        ASSIGN_OBJ                                               ~29
        44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
15.62 ms | 420 KiB | 8 Q