3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Riga'); echo 'Current time: ' . date('Y-m-d H:i:s') . "\n"; $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/Hgoe7
function name:  (null)
number of ops:  25
compiled vars:  !0 = $format, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Europe%2FRiga'
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      'Current+time%3A+', $3
          7        CONCAT                                           ~5      ~4, '%0A'
          8        ECHO                                                     ~5
    6     9        ASSIGN                                                   !0, 'Y-m-d'
    7    10        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 '2009-02-15'
         13        DO_FCALL                                      0  $7      
         14        ASSIGN                                                   !1, $7
    8    15        ROPE_INIT                                     3  ~10     'Format%3A+'
         16        ROPE_ADD                                      1  ~10     ~10, !0
         17        ROPE_END                                      2  ~9      ~10, '%3B+'
         18        INIT_METHOD_CALL                                         !1, 'format'
         19        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         20        DO_FCALL                                      0  $12     
         21        CONCAT                                           ~13     ~9, $12
         22        CONCAT                                           ~14     ~13, '%0A'
         23        ECHO                                                     ~14
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.77 ms | 1395 KiB | 17 Q