3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = \DateTime::createFromFormat("m-d-y", '07-03-17'); if ($date) { $date->setTime(0, 0); } echo $date->date;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/VQd25
function name:  (null)
number of ops:  13
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          1        SEND_VAL                                                 'm-d-y'
          2        SEND_VAL                                                 '07-03-17'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    4     5      > JMPZ                                                     !0, ->10
    5     6    >   INIT_METHOD_CALL                                         !0, 'setTime'
          7        SEND_VAL_EX                                              0
          8        SEND_VAL_EX                                              0
          9        DO_FCALL                                      0          
    7    10    >   FETCH_OBJ_R                                      ~4      !0, 'date'
         11        ECHO                                                     ~4
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.32 ms | 1393 KiB | 13 Q