3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.47 ms | 1395 KiB | 15 Q