3v4l.org

run code in 300+ PHP versions simultaneously
<?php $process = '27-Jun-2017 15:13:46'; $disclosure = '26/10/1992'; function process_date ($date) { if (!$formattedDate) { $formattedDate = DateTime::createFromFormat('d-M-Y H:i:s', $date); } var_dump($formattedDate->format('jS M Y')); } process_date($process); process_date($disclosure);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G5NlD
function name:  (null)
number of ops:  9
compiled vars:  !0 = $process, !1 = $disclosure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '27-Jun-2017+15%3A13%3A46'
    4     1        ASSIGN                                                   !1, '26%2F10%2F1992'
   15     2        INIT_FCALL                                               'process_date'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
   16     5        INIT_FCALL                                               'process_date'
          6        SEND_VAR                                                 !1
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function process_date:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/G5NlD
function name:  process_date
number of ops:  15
compiled vars:  !0 = $date, !1 = $formattedDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        BOOL_NOT                                         ~2      !1
          2      > JMPZ                                                     ~2, ->8
    9     3    >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          4        SEND_VAL                                                 'd-M-Y+H%3Ai%3As'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $3      
          7        ASSIGN                                                   !1, $3
   12     8    >   INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'format'
         10        SEND_VAL_EX                                              'jS+M+Y'
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
   13    14      > RETURN                                                   null

End of function process_date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.81 ms | 1398 KiB | 17 Q