3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myDateTime = DateTime::createFromFormat('d/m/y','14/12/17'); $newDateString = $myDateTime->format('d-m-Y'); Echo $newDateString;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AcAd
function name:  (null)
number of ops:  11
compiled vars:  !0 = $myDateTime, !1 = $newDateString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          1        SEND_VAL                                                 'd%2Fm%2Fy'
          2        SEND_VAL                                                 '14%2F12%2F17'
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_METHOD_CALL                                         !0, 'format'
          6        SEND_VAL_EX                                              'd-m-Y'
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !1, $4
    6     9        ECHO                                                     !1
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
229.76 ms | 997 KiB | 13 Q