3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateString='25/02/2013'; $myDateTime = DateTime::createFromFormat('Y-m-d', $dateString); $newDateString = $myDateTime->format('m/d/Y'); echo newDateString;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JC9Us
function name:  (null)
number of ops:  13
compiled vars:  !0 = $dateString, !1 = $myDateTime, !2 = $newDateString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '25%2F02%2F2013'
    3     1        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          2        SEND_VAL                                                 'Y-m-d'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
    4     6        INIT_METHOD_CALL                                         !1, 'format'
          7        SEND_VAL_EX                                              'm%2Fd%2FY'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !2, $6
    5    10        FETCH_CONSTANT                                   ~8      'newDateString'
         11        ECHO                                                     ~8
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.54 ms | 1393 KiB | 13 Q