3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = new \DateTime('now', new \DateTimeZone('UTC')); $d1 = new \DateTime('now', new \DateTimeZone('UTC')); if ($d->getTimeZone() === $d1->getTimeZone()) { echo '1'; } var_dump($d->getTimeZone(), $d1->getTimeZone());
based on 25J5E
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
Jump found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/L6RDp
function name:  (null)
number of ops:  32
compiled vars:  !0 = $d, !1 = $d1
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $2      :-5
         1        SEND_VAL_EX                                              'now'
         2        NEW                                              $3      :-2
         3        SEND_VAL_EX                                              'UTC'
         4        DO_FCALL                                      0          
         5        BRK                                                      
         6        DO_FCALL                                      0          
         7        ASSIGN                                                   !0, $2
   4     8        NEW                                              $7      :1
         9        SEND_VAL_EX                                              'now'
        10        NEW                                              $8      :4
        11        SEND_VAL_EX                                              'UTC'
        12        DO_FCALL                                      0          
        13        BRK                                                      
        14        DO_FCALL                                      0          
        15        ASSIGN                                                   !1, $7
   6    16        INIT_METHOD_CALL                                         !0, 'getTimeZone'
        17        DO_FCALL                                      0  $12     
        18        INIT_METHOD_CALL                                         !1, 'getTimeZone'
        19        DO_FCALL                                      0  $13     
        20        IS_IDENTICAL                                     ~14     $12, $13
        21      > JMPZ                                                     ~14, ->23
   7    22    >   ECHO                                                     '1'
  10    23    >   INIT_FCALL                                               'var_dump'
        24        INIT_METHOD_CALL                                         !0, 'getTimeZone'
        25        DO_FCALL                                      0  $15     
        26        SEND_VAR                                                 $15
        27        INIT_METHOD_CALL                                         !1, 'getTimeZone'
        28        DO_FCALL                                      0  $16     
        29        SEND_VAR                                                 $16
        30        DO_ICALL                                                 
        31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0