3v4l.org

run code in 500+ PHP versions simultaneously
<?php $s = "20180720171534449"; $date = date_create_from_format('YmdHis', substr($s,0,-3)); echo date_format($date, 'Y-m-d H:i:s');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m1XNd
function name:  (null)
number of ops:  14
compiled vars:  !0 = $s, !1 = $date
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '20180720171534449'
    4     1        INIT_FCALL                                                   'date_create_from_format'
          2        SEND_VAL                                                     'YmdHis'
          3        FRAMELESS_ICALL_3                substr              ~3      !0, 0
          4        OP_DATA                                                      -3
          5        SEND_VAL                                                     ~3
          6        DO_ICALL                                             $4      
          7        ASSIGN                                                       !1, $4
    5     8        INIT_FCALL                                                   'date_format'
          9        SEND_VAR                                                     !1
         10        SEND_VAL                                                     'Y-m-d+H%3Ai%3As'
         11        DO_ICALL                                             $6      
         12        ECHO                                                         $6
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.49 ms | 2165 KiB | 15 Q