3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ConvertGMTToLocalTimezone($gmttime,$timezoneRequired) { $date = new \DateTime('Tue, 17 Dec 2013 07:23:56 +0000'); $date->setTimeZone(new \DateTimezone($timezoneRequired)); return $date->format('D, d M Y H:i:s O'); } $ISTtime=ConvertGMTToLocalTimezone('Tue, 17 Dec 2013 08:23:56 +0000','Asia/Calcutta'); echo $ISTtime;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CEJGr
function name:  (null)
number of ops:  7
compiled vars:  !0 = $ISTtime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'convertgmttolocaltimezone'
          1        SEND_VAL                                                 'Tue%2C+17+Dec+2013+08%3A23%3A56+%2B0000'
          2        SEND_VAL                                                 'Asia%2FCalcutta'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
   10     5        ECHO                                                     !0
          6      > RETURN                                                   1

Function convertgmttolocaltimezone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CEJGr
function name:  ConvertGMTToLocalTimezone
number of ops:  17
compiled vars:  !0 = $gmttime, !1 = $timezoneRequired, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        NEW                                              $3      'DateTime'
          3        SEND_VAL_EX                                              'Tue%2C+17+Dec+2013+07%3A23%3A56+%2B0000'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $3
    5     6        INIT_METHOD_CALL                                         !2, 'setTimeZone'
          7        NEW                                              $6      'DateTimezone'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $6
         11        DO_FCALL                                      0          
    6    12        INIT_METHOD_CALL                                         !2, 'format'
         13        SEND_VAL_EX                                              'D%2C+d+M+Y+H%3Ai%3As+O'
         14        DO_FCALL                                      0  $9      
         15      > RETURN                                                   $9
    7    16*     > RETURN                                                   null

End of function convertgmttolocaltimezone

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.91 ms | 1389 KiB | 14 Q