3v4l.org

run code in 300+ PHP versions simultaneously
<?php //target time zone $target_time_zone = new DateTimeZone('America/Los_Angeles'); //find kolkata time $date_time = new DateTime('now', $target_time_zone); //get the exact GMT format echo 'GMT '. str_replace(":00","",$date_time->format('P'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ERXH5
function name:  (null)
number of ops:  20
compiled vars:  !0 = $target_time_zone, !1 = $date_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'DateTimeZone'
          1        SEND_VAL_EX                                              'America%2FLos_Angeles'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    7     4        NEW                                              $5      'DateTime'
          5        SEND_VAL_EX                                              'now'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $5
   10     9        INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 '%3A00'
         11        SEND_VAL                                                 ''
         12        INIT_METHOD_CALL                                         !1, 'format'
         13        SEND_VAL_EX                                              'P'
         14        DO_FCALL                                      0  $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                         $9      
         17        CONCAT                                           ~10     'GMT+', $9
         18        ECHO                                                     ~10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.31 ms | 1386 KiB | 15 Q