3v4l.org

run code in 300+ 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:  17
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        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 -3
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
    5    11        INIT_FCALL                                               'date_format'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         14        DO_ICALL                                         $6      
         15        ECHO                                                     $6
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.13 ms | 1003 KiB | 16 Q