3v4l.org

run code in 300+ PHP versions simultaneously
<?php $toTimezone = new DateTimeZone($toTimezone); $fromTimezone = new DateTimeZone('UTC'); $time = new DateTime($time, $fromTimezone); $time->setTimeZone($toTimezone); return $time->format($format);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lNa8J
function name:  (null)
number of ops:  21
compiled vars:  !0 = $toTimezone, !1 = $fromTimezone, !2 = $time, !3 = $format
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTimeZone'
          1        SEND_VAR_EX                                              !0
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
          4        NEW                                              $7      'DateTimeZone'
          5        SEND_VAL_EX                                              'UTC'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
          8        NEW                                              $10     'DateTime'
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $10
         13        INIT_METHOD_CALL                                         !2, 'setTimeZone'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
         16        INIT_METHOD_CALL                                         !2, 'format'
         17        SEND_VAR_EX                                              !3
         18        DO_FCALL                                      0  $14     
         19      > RETURN                                                   $14
         20*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.41 ms | 1394 KiB | 13 Q