3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateWithTimezoneLocation = new \DateTime('now', new \DateTimeZone('Europe/Paris')); $dateWithTimezoneUTCDifference = new \DateTime($d->format(\DateTime::ISO8601)); var_dump($dateWithTimezoneLocation, $dateWithTimezoneUTCDifference, $dateWithTimezoneLocation->getLocation(), $dateWithTimezoneUTCDifference->getLocation()); var_dump($d2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00skJ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $dateWithTimezoneLocation, !1 = $dateWithTimezoneUTCDifference, !2 = $d, !3 = $d2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              'now'
          2        NEW                                              $5      'DateTimeZone'
          3        SEND_VAL_EX                                              'Europe%2FParis'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $5
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $4
    4     8        NEW                                              $9      'DateTime'
          9        INIT_METHOD_CALL                                         !2, 'format'
         10        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3AsO'
         11        DO_FCALL                                      0  $10     
         12        SEND_VAR_NO_REF_EX                                       $10
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $9
    5    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        INIT_METHOD_CALL                                         !0, 'getLocation'
         19        DO_FCALL                                      0  $13     
         20        SEND_VAR                                                 $13
         21        INIT_METHOD_CALL                                         !1, 'getLocation'
         22        DO_FCALL                                      0  $14     
         23        SEND_VAR                                                 $14
         24        DO_ICALL                                                 
    7    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.41 ms | 1395 KiB | 15 Q