3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = "6 October, 2014"; $time = "1:30 AM"; $str = str_replace(",", "", $date)." ".$time; $ts = strtotime($str); $d = date("m/d/Y g:i a",$ts); echo $ts." ".$d; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7UJHU
function name:  (null)
number of ops:  23
compiled vars:  !0 = $date, !1 = $time, !2 = $str, !3 = $ts, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '6+October%2C+2014'
    4     1        ASSIGN                                                   !1, '1%3A30+AM'
    6     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $7      
          7        CONCAT                                           ~8      $7, '+'
          8        CONCAT                                           ~9      ~8, !1
          9        ASSIGN                                                   !2, ~9
    8    10        INIT_FCALL                                               'strtotime'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !3, $11
    9    14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'm%2Fd%2FY+g%3Ai+a'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $13     
         18        ASSIGN                                                   !4, $13
   11    19        CONCAT                                           ~15     !3, '%0A'
   12    20        CONCAT                                           ~16     ~15, !4
         21        ECHO                                                     ~16
   13    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.89 ms | 1395 KiB | 19 Q