3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today = new DateTime('today', new DateTimeZone('UTC')); foreach(range(-12, +12) as $zone) { $now = new DateTime('now', new DateTimeZone(sprintf('%+02d00', $zone))); printf("%s %s %s\n", $now->format(DATE_ATOM), $now < $today ? '<' : '>=', $today->format(DATE_ATOM)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 44
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 44
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/jj6oY
function name:  (null)
number of ops:  46
compiled vars:  !0 = $today, !1 = $zone, !2 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              'today'
          2        NEW                                              $4      'DateTimeZone'
          3        SEND_VAL_EX                                              'UTC'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
    4     8        INIT_FCALL                                               'range'
          9        SEND_VAL                                                 -12
         10        SEND_VAL                                                 12
         11        DO_ICALL                                         $8      
         12      > FE_RESET_R                                       $9      $8, ->44
         13    > > FE_FETCH_R                                               $9, !1, ->44
    5    14    >   NEW                                              $10     'DateTime'
         15        SEND_VAL_EX                                              'now'
         16        NEW                                              $11     'DateTimeZone'
         17        INIT_FCALL                                               'sprintf'
         18        SEND_VAL                                                 '%25%2B02d00'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $12     
         21        SEND_VAR_NO_REF_EX                                       $12
         22        DO_FCALL                                      0          
         23        SEND_VAR_NO_REF_EX                                       $11
         24        DO_FCALL                                      0          
         25        ASSIGN                                                   !2, $10
    6    26        INIT_FCALL                                               'printf'
         27        SEND_VAL                                                 '%25s+%25s+%25s%0A'
         28        INIT_METHOD_CALL                                         !2, 'format'
         29        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3AsP'
         30        DO_FCALL                                      0  $16     
         31        SEND_VAR                                                 $16
         32        IS_SMALLER                                               !2, !0
         33      > JMPZ                                                     ~17, ->36
         34    >   QM_ASSIGN                                        ~18     '%3C'
         35      > JMP                                                      ->37
         36    >   QM_ASSIGN                                        ~18     '%3E%3D'
         37    >   SEND_VAL                                                 ~18
         38        INIT_METHOD_CALL                                         !0, 'format'
         39        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3AsP'
         40        DO_FCALL                                      0  $19     
         41        SEND_VAR                                                 $19
         42        DO_ICALL                                                 
    4    43      > JMP                                                      ->13
         44    >   FE_FREE                                                  $9
    7    45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.16 ms | 1392 KiB | 19 Q