3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format_as_datetime($dt) { return substr($dt,0,4).'-'.substr($dt,4,2).'-'.substr($dt,6,2).' '.substr($dt,8,2).':'.substr($dt,10,2).':'.substr($dt,12,2); } echo strtotime(format_as_datetime("20140414221031"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgsRO
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'strtotime'
          1        INIT_FCALL                                               'format_as_datetime'
          2        SEND_VAL                                                 '20140414221031'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
          7      > RETURN                                                   1

Function format_as_datetime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgsRO
function name:  format_as_datetime
number of ops:  43
compiled vars:  !0 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 4
          5        DO_ICALL                                         $1      
          6        CONCAT                                           ~2      $1, '-'
          7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 4
         10        SEND_VAL                                                 2
         11        DO_ICALL                                         $3      
         12        CONCAT                                           ~4      ~2, $3
         13        CONCAT                                           ~5      ~4, '-'
         14        INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 6
         17        SEND_VAL                                                 2
         18        DO_ICALL                                         $6      
         19        CONCAT                                           ~7      ~5, $6
         20        CONCAT                                           ~8      ~7, '+'
         21        INIT_FCALL                                               'substr'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 8
         24        SEND_VAL                                                 2
         25        DO_ICALL                                         $9      
         26        CONCAT                                           ~10     ~8, $9
         27        CONCAT                                           ~11     ~10, '%3A'
         28        INIT_FCALL                                               'substr'
         29        SEND_VAR                                                 !0
         30        SEND_VAL                                                 10
         31        SEND_VAL                                                 2
         32        DO_ICALL                                         $12     
         33        CONCAT                                           ~13     ~11, $12
         34        CONCAT                                           ~14     ~13, '%3A'
         35        INIT_FCALL                                               'substr'
         36        SEND_VAR                                                 !0
         37        SEND_VAL                                                 12
         38        SEND_VAL                                                 2
         39        DO_ICALL                                         $15     
         40        CONCAT                                           ~16     ~14, $15
         41      > RETURN                                                   ~16
    5    42*     > RETURN                                                   null

End of function format_as_datetime

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.83 ms | 1403 KiB | 18 Q