3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set("UTC"); $tijd_in_UTC = '2014-02-10 20:18'; // voorbeeld, dit komt uit de db $datetime = new DateTime($tijd_in_UTC); echo $datetime->format('Y-m-d H:i:sP') , PHP_EOL; $datetime->setTimezone(new DateTimeZone('Europe/Amsterdam')); // of misschien kan de user zijn eigen timezone instellen en komt die ook uit de database? echo $datetime->format('Y-m-d H:i:sP'), PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIWPb
function name:  (null)
number of ops:  25
compiled vars:  !0 = $tijd_in_UTC, !1 = $datetime
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                                                 
    5     3        ASSIGN                                                   !0, '2014-02-10+20%3A18'
    7     4        NEW                                              $4      'DateTime'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
    8     8        INIT_METHOD_CALL                                         !1, 'format'
          9        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3AsP'
         10        DO_FCALL                                      0  $7      
         11        ECHO                                                     $7
         12        ECHO                                                     '%0A'
   10    13        INIT_METHOD_CALL                                         !1, 'setTimezone'
         14        NEW                                              $8      'DateTimeZone'
         15        SEND_VAL_EX                                              'Europe%2FAmsterdam'
         16        DO_FCALL                                      0          
         17        SEND_VAR_NO_REF_EX                                       $8
         18        DO_FCALL                                      0          
   11    19        INIT_METHOD_CALL                                         !1, 'format'
         20        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3AsP'
         21        DO_FCALL                                      0  $11     
         22        ECHO                                                     $11
         23        ECHO                                                     '%0A'
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.97 ms | 1442 KiB | 14 Q