3v4l.org

run code in 300+ PHP versions simultaneously
<?php $starttime = ['year' => 2019, 'month' => 5, 'day' => 10, 'hour' => 20, 'minute' => 15]; $date = new \DateTime(); $date->setDate($starttime['year'], $starttime['month'], $starttime['day']); $date->setTime($starttime['hour'], $starttime['minute']); var_dump($timestamp = $date->getTimestamp()); var_dump(date('Y-m-d H:i:s', $timestamp));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3lVr
function name:  (null)
number of ops:  37
compiled vars:  !0 = $starttime, !1 = $date, !2 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $4      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    5     4        INIT_METHOD_CALL                                         !1, 'setDate'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_DIM_FUNC_ARG                               $7      !0, 'year'
          7        SEND_FUNC_ARG                                            $7
          8        CHECK_FUNC_ARG                                           
          9        FETCH_DIM_FUNC_ARG                               $8      !0, 'month'
         10        SEND_FUNC_ARG                                            $8
         11        CHECK_FUNC_ARG                                           
         12        FETCH_DIM_FUNC_ARG                               $9      !0, 'day'
         13        SEND_FUNC_ARG                                            $9
         14        DO_FCALL                                      0          
    6    15        INIT_METHOD_CALL                                         !1, 'setTime'
         16        CHECK_FUNC_ARG                                           
         17        FETCH_DIM_FUNC_ARG                               $11     !0, 'hour'
         18        SEND_FUNC_ARG                                            $11
         19        CHECK_FUNC_ARG                                           
         20        FETCH_DIM_FUNC_ARG                               $12     !0, 'minute'
         21        SEND_FUNC_ARG                                            $12
         22        DO_FCALL                                      0          
    7    23        INIT_FCALL                                               'var_dump'
         24        INIT_METHOD_CALL                                         !1, 'getTimestamp'
         25        DO_FCALL                                      0  $14     
         26        ASSIGN                                           ~15     !2, $14
         27        SEND_VAL                                                 ~15
         28        DO_ICALL                                                 
    8    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'date'
         31        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         32        SEND_VAR                                                 !2
         33        DO_ICALL                                         $17     
         34        SEND_VAR                                                 $17
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.28 ms | 1407 KiB | 17 Q