3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz_string = 'Europe/Paris'; $timezone_utc = timezone_open('UTC'); $timezone = timezone_open($tz_string); //$lasttimestamp = time(); //$lasttimestamp = 1743296400; //$lasttimestamp = 1729990800; //$lasttimestamp = 4141328400; $lasttimestamp = 4160077200; $lasttimestamp2 = '' . $lasttimestamp; $to_min = strtr($lasttimestamp2, array('-2147483648' => '-2147483647', '-2147483647' => '-2147483647', '2147483647' => '2147483646')); $to_min = (int) $to_min; $to_min = '' . $to_min; $to_min = strtr($to_min, array('-2147483648' => '2147483647')); $to_min = (int) $to_min; $from_max = 2147483647; $to_min2 = 2147483647; if($to_min > 2147483647 || -2147483648 > $to_min) { $from_max = '2147483648'; $from_max = (int) $from_max; } elseif($to_min < 2147483647) { $to_min2 = 2147483646; } if($from_max > $to_min2) { $lasttimestamp = (int) $lasttimestamp; $timestampsec = '+0 sec'; $date1 = date_create('1970-01-01 00:00:00', $timezone_utc); $date2 = date_modify($date1, $timestampsec); $obj_rt = is_object($date2); $key3 = 1; $key4 = 1; if($obj_rt) { $transitions = timezone_transitions_get($timezone, $lasttimestamp); $count = count($transitions); if(2 > $count) { $transitions2 = timezone_transitions_get($timezone); $key2 = count($transitions2) - 1; $offset3 = $transitions2[$key2]['offset']; $lasttimestamp2 = $transitions2[$key2]['ts']; $check = $lasttimestamp2 > $lasttimestamp; if(!$check) { $lasttimestamp2 = 4160077200; $transitions3 = timezone_transitions_get($timezone, $lasttimestamp2); $offset4 = $transitions3[0]['offset']; if(7200 == $offset4) { /*foreach($transitions2 as $key => $transition) { if($lasttimestamp < $transition['ts']) { if($key2 > $key) { $key2 = $key; } } }*/ $key3 = $key2 - 1; $key4 = 0; if($key2 > 0) { $key4 = 1; } else { $key3 = 0; } //$transitiontimestamp = array($transitions2[$key3], $key4 => $transitions2[$key2]); // code here $arr = explode('T', $transitions[0]['time']); $copy = $arr[0]; $arr = explode('+', $arr[1]); $string = $copy . ' ' . $arr[0]; $date2 = null; $date1 = null; unset($date2); unset($date1); $string = strtr($string, array('+' => '')); $date1 = date_create($string, $timezone_utc); $offset1 = $transitions[0]['offset']; $timestampsec = '+'; if(0 > $offset1) { $timestampsec = ''; } $timestampsec = $timestampsec . $offset1 . ' sec'; $date2 = date_modify($date1, $timestampsec); $string = date_format($date2, 'Y-m-d H:i:s'); $date2 = null; $date1 = null; unset($date2); unset($date1); $date1 = date_create($string, $timezone); $offset2 = date_format($date1, 'Z'); $offset2 = (int) $offset2; if($offset1 != $offset2) { $key4 = $key3; //$offset3 = $transitions2[$key2]['offset']; if($offset2 == $offset3) { $key4 = $key2; } $transitions[0]['offset'] = $transitions2[$key4]['offset']; $transitions[0]['isdst'] = $transitions2[$key4]['isdst']; $transitions[0]['abbr'] = $transitions2[$key4]['abbr']; } } } $key3 = 0; $key4 = 0; } elseif($transitions[0]['ts'] == $transitions[1]['ts']) { unset($transitions[1]); if(3 > $count) { $key3 = 0; $key4 = 0; } else { $key3 = 2; } } $transitiontimestamp2 = array($transitions[0], $key4 => $transitions[$key3]); } else { // //$transitions2 = timezone_transitions_get($timezone); } } var_dump($transitiontimestamp2[0], $offset1, $offset2, $offset4); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 219
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 219
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 200
Branch analysis from position: 71
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 197
Branch analysis from position: 88
2 jumps found. (Code = 43) Position 1 = 99, Position 2 = 197
Branch analysis from position: 99
2 jumps found. (Code = 43) Position 1 = 104, Position 2 = 106
Branch analysis from position: 104
1 jumps found. (Code = 42) Position 1 = 107
Branch analysis from position: 107
2 jumps found. (Code = 43) Position 1 = 146, Position 2 = 147
Branch analysis from position: 146
2 jumps found. (Code = 43) Position 1 = 178, Position 2 = 197
Branch analysis from position: 178
2 jumps found. (Code = 43) Position 1 = 181, Position 2 = 182
Branch analysis from position: 181
1 jumps found. (Code = 42) Position 1 = 213
Branch analysis from position: 213
1 jumps found. (Code = 42) Position 1 = 219
Branch analysis from position: 219
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 182
Branch analysis from position: 197
Branch analysis from position: 147
Branch analysis from position: 106
2 jumps found. (Code = 43) Position 1 = 146, Position 2 = 147
Branch analysis from position: 146
Branch analysis from position: 147
Branch analysis from position: 197
Branch analysis from position: 197
Branch analysis from position: 200
2 jumps found. (Code = 43) Position 1 = 206, Position 2 = 213
Branch analysis from position: 206
2 jumps found. (Code = 43) Position 1 = 209, Position 2 = 212
Branch analysis from position: 209
1 jumps found. (Code = 42) Position 1 = 213
Branch analysis from position: 213
Branch analysis from position: 212
1 jumps found. (Code = 42) Position 1 = 219
Branch analysis from position: 219
Branch analysis from position: 213
Branch analysis from position: 219
Branch analysis from position: 219
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 42
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 219
Branch analysis from position: 44
Branch analysis from position: 219
Branch analysis from position: 42
Branch analysis from position: 34
filename:       /in/FGbtV
function name:  (null)
number of ops:  227
compiled vars:  !0 = $tz_string, !1 = $timezone_utc, !2 = $timezone, !3 = $lasttimestamp, !4 = $lasttimestamp2, !5 = $to_min, !6 = $from_max, !7 = $to_min2, !8 = $timestampsec, !9 = $date1, !10 = $date2, !11 = $obj_rt, !12 = $key3, !13 = $key4, !14 = $transitions, !15 = $count, !16 = $transitions2, !17 = $key2, !18 = $offset3, !19 = $check, !20 = $transitions3, !21 = $offset4, !22 = $arr, !23 = $copy, !24 = $string, !25 = $offset1, !26 = $offset2, !27 = $transitiontimestamp2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Europe%2FParis'
    4     1        INIT_FCALL                                               'timezone_open'
          2        SEND_VAL                                                 'UTC'
          3        DO_ICALL                                         $29     
          4        ASSIGN                                                   !1, $29
    5     5        INIT_FCALL                                               'timezone_open'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $31     
          8        ASSIGN                                                   !2, $31
   10     9        ASSIGN                                                   !3, 4160077200
   11    10        CONCAT                                           ~34     '', !3
         11        ASSIGN                                                   !4, ~34
   12    12        INIT_FCALL                                               'strtr'
         13        SEND_VAR                                                 !4
         14        SEND_VAL                                                 <array>
         15        DO_ICALL                                         $36     
         16        ASSIGN                                                   !5, $36
   13    17        CAST                                          4  ~38     !5
         18        ASSIGN                                                   !5, ~38
   14    19        CONCAT                                           ~40     '', !5
         20        ASSIGN                                                   !5, ~40
   15    21        INIT_FCALL                                               'strtr'
         22        SEND_VAR                                                 !5
         23        SEND_VAL                                                 <array>
         24        DO_ICALL                                         $42     
         25        ASSIGN                                                   !5, $42
   16    26        CAST                                          4  ~44     !5
         27        ASSIGN                                                   !5, ~44
   17    28        ASSIGN                                                   !6, 2147483647
   18    29        ASSIGN                                                   !7, 2147483647
   19    30        IS_SMALLER                                       ~48     2147483647, !5
         31      > JMPNZ_EX                                         ~48     ~48, ->34
         32    >   IS_SMALLER                                       ~49     !5, -2147483648
         33        BOOL                                             ~48     ~49
         34    > > JMPZ                                                     ~48, ->39
   20    35    >   ASSIGN                                                   !6, '2147483648'
   21    36        CAST                                          4  ~51     !6
         37        ASSIGN                                                   !6, ~51
   19    38      > JMP                                                      ->42
   22    39    >   IS_SMALLER                                               !5, 2147483647
         40      > JMPZ                                                     ~53, ->42
   23    41    >   ASSIGN                                                   !7, 2147483646
   25    42    >   IS_SMALLER                                               !7, !6
         43      > JMPZ                                                     ~55, ->219
   26    44    >   CAST                                          4  ~56     !3
         45        ASSIGN                                                   !3, ~56
   27    46        ASSIGN                                                   !8, '%2B0+sec'
   28    47        INIT_FCALL                                               'date_create'
         48        SEND_VAL                                                 '1970-01-01+00%3A00%3A00'
         49        SEND_VAR                                                 !1
         50        DO_ICALL                                         $59     
         51        ASSIGN                                                   !9, $59
   29    52        INIT_FCALL                                               'date_modify'
         53        SEND_VAR                                                 !9
         54        SEND_VAR                                                 !8
         55        DO_ICALL                                         $61     
         56        ASSIGN                                                   !10, $61
   30    57        TYPE_CHECK                                  256  ~63     !10
         58        ASSIGN                                                   !11, ~63
   31    59        ASSIGN                                                   !12, 1
   32    60        ASSIGN                                                   !13, 1
   33    61      > JMPZ                                                     !11, ->219
   34    62    >   INIT_FCALL                                               'timezone_transitions_get'
         63        SEND_VAR                                                 !2
         64        SEND_VAR                                                 !3
         65        DO_ICALL                                         $67     
         66        ASSIGN                                                   !14, $67
   35    67        COUNT                                            ~69     !14
         68        ASSIGN                                                   !15, ~69
   36    69        IS_SMALLER                                               !15, 2
         70      > JMPZ                                                     ~71, ->200
   37    71    >   INIT_FCALL                                               'timezone_transitions_get'
         72        SEND_VAR                                                 !2
         73        DO_ICALL                                         $72     
         74        ASSIGN                                                   !16, $72
   38    75        COUNT                                            ~74     !16
         76        SUB                                              ~75     ~74, 1
         77        ASSIGN                                                   !17, ~75
   39    78        FETCH_DIM_R                                      ~77     !16, !17
         79        FETCH_DIM_R                                      ~78     ~77, 'offset'
         80        ASSIGN                                                   !18, ~78
   40    81        FETCH_DIM_R                                      ~80     !16, !17
         82        FETCH_DIM_R                                      ~81     ~80, 'ts'
         83        ASSIGN                                                   !4, ~81
   41    84        IS_SMALLER                                       ~83     !3, !4
         85        ASSIGN                                                   !19, ~83
   42    86        BOOL_NOT                                         ~85     !19
         87      > JMPZ                                                     ~85, ->197
   43    88    >   ASSIGN                                                   !4, 4160077200
   44    89        INIT_FCALL                                               'timezone_transitions_get'
         90        SEND_VAR                                                 !2
         91        SEND_VAR                                                 !4
         92        DO_ICALL                                         $87     
         93        ASSIGN                                                   !20, $87
   45    94        FETCH_DIM_R                                      ~89     !20, 0
         95        FETCH_DIM_R                                      ~90     ~89, 'offset'
         96        ASSIGN                                                   !21, ~90
   46    97        IS_EQUAL                                                 !21, 7200
         98      > JMPZ                                                     ~92, ->197
   54    99    >   SUB                                              ~93     !17, 1
        100        ASSIGN                                                   !12, ~93
   55   101        ASSIGN                                                   !13, 0
   56   102        IS_SMALLER                                               0, !17
        103      > JMPZ                                                     ~96, ->106
   57   104    >   ASSIGN                                                   !13, 1
   56   105      > JMP                                                      ->107
   59   106    >   ASSIGN                                                   !12, 0
   63   107    >   INIT_FCALL                                               'explode'
        108        SEND_VAL                                                 'T'
        109        FETCH_DIM_R                                      ~99     !14, 0
        110        FETCH_DIM_R                                      ~100    ~99, 'time'
        111        SEND_VAL                                                 ~100
        112        DO_ICALL                                         $101    
        113        ASSIGN                                                   !22, $101
   64   114        FETCH_DIM_R                                      ~103    !22, 0
        115        ASSIGN                                                   !23, ~103
   65   116        INIT_FCALL                                               'explode'
        117        SEND_VAL                                                 '%2B'
        118        FETCH_DIM_R                                      ~105    !22, 1
        119        SEND_VAL                                                 ~105
        120        DO_ICALL                                         $106    
        121        ASSIGN                                                   !22, $106
   66   122        CONCAT                                           ~108    !23, '+'
        123        FETCH_DIM_R                                      ~109    !22, 0
        124        CONCAT                                           ~110    ~108, ~109
        125        ASSIGN                                                   !24, ~110
   67   126        ASSIGN                                                   !10, null
   68   127        ASSIGN                                                   !9, null
   69   128        UNSET_CV                                                 !10
   70   129        UNSET_CV                                                 !9
   71   130        INIT_FCALL                                               'strtr'
        131        SEND_VAR                                                 !24
        132        SEND_VAL                                                 <array>
        133        DO_ICALL                                         $114    
        134        ASSIGN                                                   !24, $114
   72   135        INIT_FCALL                                               'date_create'
        136        SEND_VAR                                                 !24
        137        SEND_VAR                                                 !1
        138        DO_ICALL                                         $116    
        139        ASSIGN                                                   !9, $116
   73   140        FETCH_DIM_R                                      ~118    !14, 0
        141        FETCH_DIM_R                                      ~119    ~118, 'offset'
        142        ASSIGN                                                   !25, ~119
   74   143        ASSIGN                                                   !8, '%2B'
   75   144        IS_SMALLER                                               !25, 0
        145      > JMPZ                                                     ~122, ->147
   76   146    >   ASSIGN                                                   !8, ''
   78   147    >   CONCAT                                           ~124    !8, !25
        148        CONCAT                                           ~125    ~124, '+sec'
        149        ASSIGN                                                   !8, ~125
   79   150        INIT_FCALL                                               'date_modify'
        151        SEND_VAR                                                 !9
        152        SEND_VAR                                                 !8
        153        DO_ICALL                                         $127    
        154        ASSIGN                                                   !10, $127
   80   155        INIT_FCALL                                               'date_format'
        156        SEND_VAR                                                 !10
        157        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
        158        DO_ICALL                                         $129    
        159        ASSIGN                                                   !24, $129
   81   160        ASSIGN                                                   !10, null
   82   161        ASSIGN                                                   !9, null
   83   162        UNSET_CV                                                 !10
   84   163        UNSET_CV                                                 !9
   85   164        INIT_FCALL                                               'date_create'
        165        SEND_VAR                                                 !24
        166        SEND_VAR                                                 !2
        167        DO_ICALL                                         $133    
        168        ASSIGN                                                   !9, $133
   86   169        INIT_FCALL                                               'date_format'
        170        SEND_VAR                                                 !9
        171        SEND_VAL                                                 'Z'
        172        DO_ICALL                                         $135    
        173        ASSIGN                                                   !26, $135
   87   174        CAST                                          4  ~137    !26
        175        ASSIGN                                                   !26, ~137
   88   176        IS_NOT_EQUAL                                             !25, !26
        177      > JMPZ                                                     ~139, ->197
   89   178    >   ASSIGN                                                   !13, !12
   91   179        IS_EQUAL                                                 !26, !18
        180      > JMPZ                                                     ~141, ->182
   92   181    >   ASSIGN                                                   !13, !17
   94   182    >   FETCH_DIM_R                                      ~145    !16, !13
        183        FETCH_DIM_R                                      ~146    ~145, 'offset'
        184        FETCH_DIM_W                                      $143    !14, 0
        185        ASSIGN_DIM                                               $143, 'offset'
        186        OP_DATA                                                  ~146
   95   187        FETCH_DIM_R                                      ~149    !16, !13
        188        FETCH_DIM_R                                      ~150    ~149, 'isdst'
        189        FETCH_DIM_W                                      $147    !14, 0
        190        ASSIGN_DIM                                               $147, 'isdst'
        191        OP_DATA                                                  ~150
   96   192        FETCH_DIM_R                                      ~153    !16, !13
        193        FETCH_DIM_R                                      ~154    ~153, 'abbr'
        194        FETCH_DIM_W                                      $151    !14, 0
        195        ASSIGN_DIM                                               $151, 'abbr'
        196        OP_DATA                                                  ~154
  100   197    >   ASSIGN                                                   !12, 0
  101   198        ASSIGN                                                   !13, 0
   36   199      > JMP                                                      ->213
  102   200    >   FETCH_DIM_R                                      ~157    !14, 0
        201        FETCH_DIM_R                                      ~158    ~157, 'ts'
        202        FETCH_DIM_R                                      ~159    !14, 1
        203        FETCH_DIM_R                                      ~160    ~159, 'ts'
        204        IS_EQUAL                                                 ~158, ~160
        205      > JMPZ                                                     ~161, ->213
  103   206    >   UNSET_DIM                                                !14, 1
  104   207        IS_SMALLER                                               !15, 3
        208      > JMPZ                                                     ~162, ->212
  105   209    >   ASSIGN                                                   !12, 0
  106   210        ASSIGN                                                   !13, 0
  104   211      > JMP                                                      ->213
  108   212    >   ASSIGN                                                   !12, 2
  111   213    >   FETCH_DIM_R                                      ~166    !14, 0
        214        INIT_ARRAY                                       ~167    ~166
        215        FETCH_DIM_R                                      ~168    !14, !12
        216        ADD_ARRAY_ELEMENT                                ~167    ~168, !13
        217        ASSIGN                                                   !27, ~167
   33   218      > JMP                                                      ->219
  117   219    >   INIT_FCALL                                               'var_dump'
        220        FETCH_DIM_R                                      ~170    !27, 0
        221        SEND_VAL                                                 ~170
        222        SEND_VAR                                                 !25
        223        SEND_VAR                                                 !26
        224        SEND_VAR                                                 !21
        225        DO_ICALL                                                 
  119   226      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.29 ms | 991 KiB | 21 Q