3v4l.org

run code in 300+ PHP versions simultaneously
<?php //First we are setting the time to the current time, in the Chicago time zone $date = new DateTime(null, new DateTimeZone('America/Chicago')); //Then We are going to echo this information echo "<b>Chicago:</b> "; echo date_format($date, 'F jS Y H:i:s P') . "<br>"; //Now we are going to show the exact same time, the current time, for Madrid echo "<b>Madrid:</b> "; date_timezone_set($date, timezone_open('Europe/Madrid')); echo date_format($date, 'F jS Y H:i:s P') . "\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KeWBM
function name:  (null)
number of ops:  30
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $1      'DateTime'
          1        SEND_VAL_EX                                              null
          2        NEW                                              $2      'DateTimeZone'
          3        SEND_VAL_EX                                              'America%2FChicago'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $1
    9     8        ECHO                                                     '%3Cb%3EChicago%3A%3C%2Fb%3E+'
   11     9        INIT_FCALL                                               'date_format'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'F+jS+Y+H%3Ai%3As+++P'
         12        DO_ICALL                                         $6      
         13        CONCAT                                           ~7      $6, '%3Cbr%3E'
         14        ECHO                                                     ~7
   15    15        ECHO                                                     '%3Cb%3EMadrid%3A%3C%2Fb%3E+'
   17    16        INIT_FCALL                                               'date_timezone_set'
         17        SEND_VAR                                                 !0
         18        INIT_FCALL                                               'timezone_open'
         19        SEND_VAL                                                 'Europe%2FMadrid'
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                                 
   19    23        INIT_FCALL                                               'date_format'
         24        SEND_VAR                                                 !0
         25        SEND_VAL                                                 'F+jS+Y+H%3Ai%3As+++P'
         26        DO_ICALL                                         $10     
         27        CONCAT                                           ~11     $10, '%0A'
         28        ECHO                                                     ~11
   21    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.16 ms | 1395 KiB | 19 Q