3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_zone = 'Europe/Warsaw'; date_default_timezone_set($time_zone); $iluoDates = array( '2013-09-16 00:00:00', '2013-09-16 10:00:00', '2013-09-16 20:00:00', '2013-09-16 23:00:00', ); $ecDates = array( '2013-09-16 02:00:00', '2013-09-16 12:00:00', '2013-09-16 22:00:00', '2013-09-17 01:00:00', ); foreach ($ecDates as $id => $date) { $time = strtotime($date); date_default_timezone_set('UTC'); $ecDates[$id] = date("Y-m-d H:i:s", $time); date_default_timezone_set($time_zone); } echo '<pre>'; print_r($iluoDates); print_r($ecDates);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 26
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 26
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/p1rt9
function name:  (null)
number of ops:  35
compiled vars:  !0 = $time_zone, !1 = $iluoDates, !2 = $ecDates, !3 = $date, !4 = $id, !5 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Europe%2FWarsaw'
    3     1        INIT_FCALL                                               'date_default_timezone_set'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    4     4        ASSIGN                                                   !1, <array>
   11     5        ASSIGN                                                   !2, <array>
   18     6      > FE_RESET_R                                       $10     !2, ->26
          7    > > FE_FETCH_R                                       ~11     $10, !3, ->26
          8    >   ASSIGN                                                   !4, ~11
   19     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $13     
         12        ASSIGN                                                   !5, $13
   20    13        INIT_FCALL                                               'date_default_timezone_set'
         14        SEND_VAL                                                 'UTC'
         15        DO_ICALL                                                 
   21    16        INIT_FCALL                                               'date'
         17        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $17     
         20        ASSIGN_DIM                                               !2, !4
         21        OP_DATA                                                  $17
   22    22        INIT_FCALL                                               'date_default_timezone_set'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
   18    25      > JMP                                                      ->7
         26    >   FE_FREE                                                  $10
   24    27        ECHO                                                     '%3Cpre%3E'
   25    28        INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
   26    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !2
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.8 ms | 1401 KiB | 21 Q