3v4l.org

run code in 300+ PHP versions simultaneously
<?php function reformat_published_date($date) { var_dump(base64_encode(var_export($date, true))); $myDateTime = DateTime::createFromFormat('D, m/d/Y - H:i', trim($date)); // $myDateTime = DateTime::createFromFormat('D, m/d/Y - H:i', 'Thu, 10/17/2013 - 12:26'); var_dump($myDateTime); $newDate = $myDateTime->format('F jS, Y'); return $newDate; } $result = reformat_published_date('Sun, 10/27/2013 - 16:35'); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQKjP
function name:  (null)
number of ops:  8
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'reformat_published_date'
          1        SEND_VAL                                                 'Sun%2C+10%2F27%2F2013+-+16%3A35'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   14     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function reformat_published_date:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQKjP
function name:  reformat_published_date
number of ops:  28
compiled vars:  !0 = $date, !1 = $myDateTime, !2 = $newDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'base64_encode'
          3        INIT_FCALL                                               'var_export'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
    5    11        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         12        SEND_VAL                                                 'D%2C+m%2Fd%2FY+-+H%3Ai'
         13        INIT_FCALL                                               'trim'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        DO_FCALL                                      0  $7      
         18        ASSIGN                                                   !1, $7
    7    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
    8    22        INIT_METHOD_CALL                                         !1, 'format'
         23        SEND_VAL_EX                                              'F+jS%2C+Y'
         24        DO_FCALL                                      0  $10     
         25        ASSIGN                                                   !2, $10
   10    26      > RETURN                                                   !2
   11    27*     > RETURN                                                   null

End of function reformat_published_date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.23 ms | 1390 KiB | 22 Q