3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(new DateTime("@" . strtotime("12/21/2017 19:00"), new DateTimeZone("PDT"))); var_dump(new DateTime("@" . strtotime("12/21/2017 19:00"))); var_dump( DateTime::createFromFormat( "Y-m-d H:i:s", date("Y-m-d H:i:s", strtotime("12/21/2017 19:00")), new DateTimeZone("PDT") ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rqnVD
function name:  (null)
number of ops:  43
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'DateTime'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '12%2F21%2F2017+19%3A00'
          4        DO_ICALL                                         $1      
          5        CONCAT                                           ~2      '%40', $1
          6        SEND_VAL_EX                                              ~2
          7        NEW                                              $3      'DateTimeZone'
          8        SEND_VAL_EX                                              'PDT'
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $3
         11        DO_FCALL                                      0          
         12        SEND_VAR                                                 $0
         13        DO_ICALL                                                 
    4    14        INIT_FCALL                                               'var_dump'
         15        NEW                                              $7      'DateTime'
         16        INIT_FCALL                                               'strtotime'
         17        SEND_VAL                                                 '12%2F21%2F2017+19%3A00'
         18        DO_ICALL                                         $8      
         19        CONCAT                                           ~9      '%40', $8
         20        SEND_VAL_EX                                              ~9
         21        DO_FCALL                                      0          
         22        SEND_VAR                                                 $7
         23        DO_ICALL                                                 
    5    24        INIT_FCALL                                               'var_dump'
    6    25        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
    7    26        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
    8    27        INIT_FCALL                                               'date'
         28        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         29        INIT_FCALL                                               'strtotime'
         30        SEND_VAL                                                 '12%2F21%2F2017+19%3A00'
         31        DO_ICALL                                         $12     
         32        SEND_VAR                                                 $12
         33        DO_ICALL                                         $13     
         34        SEND_VAR                                                 $13
    9    35        NEW                                              $14     'DateTimeZone'
         36        SEND_VAL_EX                                              'PDT'
         37        DO_FCALL                                      0          
         38        SEND_VAR                                                 $14
         39        DO_FCALL                                      0  $16     
         40        SEND_VAR                                                 $16
         41        DO_ICALL                                                 
   11    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.26 ms | 1396 KiB | 19 Q