3v4l.org

run code in 500+ PHP versions simultaneously
<?php foreach (DateTimeZone::listIdentifiers() as $tz) { date_default_timezone_set($tz); $date1 = new \DateTime('2019-09-24 11:47:24'); $date2 = new \DateTime('2019-08-21 12:47:24'); $diff = $date1->diff($date2); if ($diff->h < 0) { echo $tz, PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 25
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 24
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/94hkf
function name:  (null)
number of ops:  27
compiled vars:  !0 = $tz, !1 = $date1, !2 = $date2, !3 = $diff
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                      'DateTimeZone', 'listIdentifiers'
          1        DO_FCALL                                          0  $4      
          2      > FE_RESET_R                                           $5      $4, ->25
          3    > > FE_FETCH_R                                                   $5, !0, ->25
    4     4    >   INIT_FCALL                                                   'date_default_timezone_set'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                                     
    5     7        NEW                                                  $7      'DateTime'
          8        SEND_VAL_EX                                                  '2019-09-24+11%3A47%3A24'
          9        DO_FCALL                                          0          
         10        ASSIGN                                                       !1, $7
    6    11        NEW                                                  $10     'DateTime'
         12        SEND_VAL_EX                                                  '2019-08-21+12%3A47%3A24'
         13        DO_FCALL                                          0          
         14        ASSIGN                                                       !2, $10
    7    15        INIT_METHOD_CALL                                             !1, 'diff'
         16        SEND_VAR_EX                                                  !2
         17        DO_FCALL                                          0  $13     
         18        ASSIGN                                                       !3, $13
    9    19        FETCH_OBJ_R                                          ~15     !3, 'h'
         20        IS_SMALLER                                                   ~15, 0
         21      > JMPZ                                                         ~16, ->24
   10    22    >   ECHO                                                         !0
         23        ECHO                                                         '%0A'
    3    24    > > JMP                                                          ->3
         25    >   FE_FREE                                                      $5
   12    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.65 ms | 2094 KiB | 14 Q