3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); echo (new DateTime())->format('Y-m-d H:i:s') . PHP_EOL; date_default_timezone_set('Europe/London'); echo (new DateTime())->format('Y-m-d H:i:s');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q0WDu
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    4     3        NEW                                              $1      'DateTime'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $1, 'format'
          6        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
          7        DO_FCALL                                      0  $3      
          8        CONCAT                                           ~4      $3, '%0A'
          9        ECHO                                                     ~4
    5    10        INIT_FCALL                                               'date_default_timezone_set'
         11        SEND_VAL                                                 'Europe%2FLondon'
         12        DO_ICALL                                                 
    6    13        NEW                                              $6      'DateTime'
         14        DO_FCALL                                      0          
         15        INIT_METHOD_CALL                                         $6, 'format'
         16        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         17        DO_FCALL                                      0  $8      
         18        ECHO                                                     $8
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.94 ms | 1399 KiB | 15 Q