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) { echo new DateTime($d).'<br />'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/4eBpL
function name:  (null)
number of ops:  19
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, ->17
         10    > > FE_FETCH_R                                               $7, !1, ->17
    9    11    >   NEW                                              $8      'DateTime'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
         14        CONCAT                                           ~10     $8, '%3Cbr+%2F%3E'
         15        ECHO                                                     ~10
    8    16      > JMP                                                      ->10
         17    >   FE_FREE                                                  $7
   10    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.71 ms | 1393 KiB | 13 Q