3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = new DateTimeImmutable('2016-10-29T00:00:00UTC+00:00'); $londonTimeZone = new DateTimeZone('Europe/London'); $londonTime = $time->setTimezone($londonTimeZone); $notLondonTime = new DateTimeImmutable('2016-10-29T00:00:00+00:00', new DateTimeZone('Europe/London')); var_dump($londonTime, $notLondonTime);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lgFb3
function name:  (null)
number of ops:  25
compiled vars:  !0 = $time, !1 = $londonTimeZone, !2 = $londonTime, !3 = $notLondonTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTimeImmutable'
          1        SEND_VAL_EX                                              '2016-10-29T00%3A00%3A00UTC%2B00%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        NEW                                              $7      'DateTimeZone'
          5        SEND_VAL_EX                                              'Europe%2FLondon'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    5     8        INIT_METHOD_CALL                                         !0, 'setTimezone'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
    7    12        NEW                                              $12     'DateTimeImmutable'
         13        SEND_VAL_EX                                              '2016-10-29T00%3A00%3A00%2B00%3A00'
         14        NEW                                              $13     'DateTimeZone'
         15        SEND_VAL_EX                                              'Europe%2FLondon'
         16        DO_FCALL                                      0          
         17        SEND_VAR_NO_REF_EX                                       $13
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !3, $12
    9    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.36 ms | 1445 KiB | 14 Q