3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 1730597400 = 01:30:00 according to UTC $date = DateTime::createFromFormat('U', '1730597400'); var_dump($date); // 01:30:00 of UTC // 1730597400 = 21:30:00 according to America/Toronto $date = DateTime::createFromFormat('U e', '1730597400 America/Toronto'); var_dump($date); // 21:30:00 of America/Toronto // 1730597400 = 01:30:00 according to UTC $date = DateTime::createFromFormat('U', '1730597400'); $date->setTimezone(new DateTimeZone('America/Toronto')); var_dump($date); // 21:30:00 of America/Toronto
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e2eFe
function name:  (null)
number of ops:  31
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          1        SEND_VAL                                                 'U'
          2        SEND_VAL                                                 '1730597400'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    8     8        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          9        SEND_VAL                                                 'U+e'
         10        SEND_VAL                                                 '1730597400+America%2FToronto'
         11        DO_FCALL                                      0  $4      
         12        ASSIGN                                                   !0, $4
    9    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   12    16        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         17        SEND_VAL                                                 'U'
         18        SEND_VAL                                                 '1730597400'
         19        DO_FCALL                                      0  $7      
         20        ASSIGN                                                   !0, $7
   13    21        INIT_METHOD_CALL                                         !0, 'setTimezone'
         22        NEW                                              $9      'DateTimeZone'
         23        SEND_VAL_EX                                              'America%2FToronto'
         24        DO_FCALL                                      0          
         25        SEND_VAR_NO_REF_EX                                       $9
         26        DO_FCALL                                      0          
   14    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.89 ms | 1436 KiB | 14 Q