3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'Y-m-d'; $date = DateTime::createFromFormat($format, '2009-02-15'); echo "Format: $format; " . $date->format('Y-m-d H:i:s') . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O3FMY
function name:  (null)
number of ops:  16
compiled vars:  !0 = $format, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Y-m-d'
    3     1        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '2009-02-15'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
    4     6        ROPE_INIT                                     3  ~6      'Format%3A+'
          7        ROPE_ADD                                      1  ~6      ~6, !0
          8        ROPE_END                                      2  ~5      ~6, '%3B+'
          9        INIT_METHOD_CALL                                         !1, 'format'
         10        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         11        DO_FCALL                                      0  $8      
         12        CONCAT                                           ~9      ~5, $8
         13        CONCAT                                           ~10     ~9, '%0A'
         14        ECHO                                                     ~10
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.64 ms | 938 KiB | 14 Q