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( 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/mRjVi
function name:  (null)
number of ops:  33
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                                                 
    5    14        INIT_FCALL                                               'var_dump'
    6    15        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
    7    16        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
    8    17        INIT_FCALL                                               'date'
         18        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         19        INIT_FCALL                                               'strtotime'
         20        SEND_VAL                                                 '12%2F21%2F2017+19%3A00'
         21        DO_ICALL                                         $7      
         22        SEND_VAR                                                 $7
         23        DO_ICALL                                         $8      
         24        SEND_VAR                                                 $8
    9    25        NEW                                              $9      'DateTimeZone'
         26        SEND_VAL_EX                                              'PDT'
         27        DO_FCALL                                      0          
         28        SEND_VAR                                                 $9
         29        DO_FCALL                                      0  $11     
         30        SEND_VAR                                                 $11
         31        DO_ICALL                                                 
   11    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.74 ms | 1396 KiB | 19 Q