3v4l.org

run code in 500+ PHP versions simultaneously
<?php $stringdate = "8/29/2011 1:00 PM"; $timestemp = strtotime($stringdate); $date = date('Y-m-d', $timestemp); $time = date('H:i:s',$timestemp); echo $date; echo $time;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5LIm
function name:  (null)
number of ops:  18
compiled vars:  !0 = $stringdate, !1 = $timestemp, !2 = $date, !3 = $time
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '8%2F29%2F2011+1%3A00+PM'
    4     1        INIT_FCALL                                                   'strtotime'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $5      
          4        ASSIGN                                                       !1, $5
    5     5        INIT_FCALL                                                   'date'
          6        SEND_VAL                                                     'Y-m-d'
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                             $7      
          9        ASSIGN                                                       !2, $7
    6    10        INIT_FCALL                                                   'date'
         11        SEND_VAL                                                     'H%3Ai%3As'
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                             $9      
         14        ASSIGN                                                       !3, $9
    8    15        ECHO                                                         !2
   10    16        ECHO                                                         !3
   11    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
229.01 ms | 2092 KiB | 15 Q