3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = array(); $date[] = '01/12/2014'; $date[] = '1/12/2014'; $date[] = '2014-12-1'; $date[] = '2014-12-01'; foreach ($date as $d) { print_r(new DateTime($d)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/i644U
function name:  (null)
number of ops:  20
compiled vars:  !0 = $date, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  '01%2F12%2F2014'
    4     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  '1%2F12%2F2014'
    5     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  '2014-12-1'
    6     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  '2014-12-01'
    8     9      > FE_RESET_R                                       $7      !0, ->18
         10    > > FE_FETCH_R                                               $7, !1, ->18
    9    11    >   INIT_FCALL                                               'print_r'
         12        NEW                                              $8      'DateTime'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                                 
    8    17      > JMP                                                      ->10
         18    >   FE_FREE                                                  $7
   10    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.93 ms | 1399 KiB | 15 Q