3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt='03-16-2005'; $d=explode('-',$dt); print $d[0]; $date = new \DateTime('03-16-2005'); var_dump($date);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2frJu
function name:  (null)
number of ops:  16
compiled vars:  !0 = $dt, !1 = $d, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '03-16-2005'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '-'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        FETCH_DIM_R                                      ~6      !1, 0
          7        ECHO                                                     ~6
    5     8        NEW                                              $7      'DateTime'
          9        SEND_VAL_EX                                              '03-16-2005'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $7
    6    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.9 ms | 1394 KiB | 17 Q