3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2015-08-26T05:00:00-0500'); $timeZone = new DateTimeZone('EDT'); $date = $date->setTimezone($timeZone)->format('g:i a'); echo $date;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4iqv9
function name:  (null)
number of ops:  17
compiled vars:  !0 = $date, !1 = $timeZone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '2015-08-26T05%3A00%3A00-0500'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    3     4        NEW                                              $5      'DateTimeZone'
          5        SEND_VAL_EX                                              'EDT'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
    5     8        INIT_METHOD_CALL                                         !0, 'setTimezone'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $8      
         11        INIT_METHOD_CALL                                         $8, 'format'
         12        SEND_VAL_EX                                              'g%3Ai+a'
         13        DO_FCALL                                      0  $9      
         14        ASSIGN                                                   !0, $9
    7    15        ECHO                                                     !0
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.3 ms | 946 KiB | 14 Q