3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = "12/31/2013"; echo (date("Y-m-d", strtotime($date))) . "\n"; $date = new DateTime($date); echo $date->format('Y-m-d H:i:sP') . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GgCe4
function name:  (null)
number of ops:  20
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '12%2F31%2F2013'
    3     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      $3, '%0A'
          9        ECHO                                                     ~4
    5    10        NEW                                              $5      'DateTime'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !0, $5
    6    14        INIT_METHOD_CALL                                         !0, 'format'
         15        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3AsP'
         16        DO_FCALL                                      0  $8      
         17        CONCAT                                           ~9      $8, '%0A'
         18        ECHO                                                     ~9
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.75 ms | 1394 KiB | 17 Q