3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_Datetime_Now() { $tz_object = new DateTimeZone('Brazil/East'); //date_default_timezone_set('Brazil/East'); $datetime = new DateTime(); $datetime->setTimezone($tz_object); return $datetime->format('Y\-m\-d\ h:i:s'); } $datetime1 = new DateTime(); echo $datetime1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1bmZg
function name:  (null)
number of ops:  5
compiled vars:  !0 = $datetime1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        ECHO                                                     !0
          4      > RETURN                                                   1

Function get_datetime_now:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1bmZg
function name:  get_Datetime_Now
number of ops:  15
compiled vars:  !0 = $tz_object, !1 = $datetime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTimeZone'
          1        SEND_VAL_EX                                              'Brazil%2FEast'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    6     4        NEW                                              $5      'DateTime'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
    7     7        INIT_METHOD_CALL                                         !1, 'setTimezone'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
    8    10        INIT_METHOD_CALL                                         !1, 'format'
         11        SEND_VAL_EX                                              'Y%5C-m%5C-d%5C+h%3Ai%3As'
         12        DO_FCALL                                      0  $9      
         13      > RETURN                                                   $9
   10    14*     > RETURN                                                   null

End of function get_datetime_now

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.91 ms | 1394 KiB | 13 Q