3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = new DateTime('2016-03-11 11:00:00', new DateTimeZone('UTC')); $d1->setTimezone(new DateTimeZone('-0400')); echo $d1->format('U'); echo "\n"; $t1 = $d1->getTimestamp(); echo $t1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rEUFs
function name:  (null)
number of ops:  24
compiled vars:  !0 = $d1, !1 = $t1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '2016-03-11+11%3A00%3A00'
          2        NEW                                              $3      'DateTimeZone'
          3        SEND_VAL_EX                                              'UTC'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $3
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
    3     8        INIT_METHOD_CALL                                         !0, 'setTimezone'
          9        NEW                                              $7      'DateTimeZone'
         10        SEND_VAL_EX                                              '-0400'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $7
         13        DO_FCALL                                      0          
    4    14        INIT_METHOD_CALL                                         !0, 'format'
         15        SEND_VAL_EX                                              'U'
         16        DO_FCALL                                      0  $10     
         17        ECHO                                                     $10
    5    18        ECHO                                                     '%0A'
    6    19        INIT_METHOD_CALL                                         !0, 'getTimestamp'
         20        DO_FCALL                                      0  $11     
         21        ASSIGN                                                   !1, $11
    7    22        ECHO                                                     !1
    8    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.04 ms | 1448 KiB | 13 Q