3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timezone_string1 = 'America/Regina'; $timezone_string2 = 'Europe/Zurich'; $summer = '2012-06-01 00:00:00'; $winter = '2012-12-01 00:00:00'; $format = 'Y-m-d H:i:s T P e'; echo "Summer: $summer\n"; $timezone_object = timezone_open( $timezone_string1 ); $date_object_summer = date_create( $summer, $timezone_object ); var_dump( date_format( $date_object_summer, $format ) ); $timezone_object = timezone_open( $timezone_string2 ); $date_object_summer = date_create( $summer, $timezone_object ); var_dump( date_format( $date_object_summer, $format ) ); echo "\nWinter: $winter\n"; $timezone_object = timezone_open( $timezone_string1 ); $date_object_winter = date_create( $winter, $timezone_object ); var_dump( date_format( $date_object_winter, $format ) ); $timezone_object = timezone_open( $timezone_string2 ); $date_object_winter = date_create( $winter, $timezone_object ); var_dump( date_format( $date_object_winter, $format ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L59eg
function name:  (null)
number of ops:  78
compiled vars:  !0 = $timezone_string1, !1 = $timezone_string2, !2 = $summer, !3 = $winter, !4 = $format, !5 = $timezone_object, !6 = $date_object_summer, !7 = $date_object_winter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'America%2FRegina'
    4     1        ASSIGN                                                   !1, 'Europe%2FZurich'
    6     2        ASSIGN                                                   !2, '2012-06-01+00%3A00%3A00'
    7     3        ASSIGN                                                   !3, '2012-12-01+00%3A00%3A00'
    8     4        ASSIGN                                                   !4, 'Y-m-d+H%3Ai%3As+T+P+e'
   10     5        ROPE_INIT                                     3  ~14     'Summer%3A+'
          6        ROPE_ADD                                      1  ~14     ~14, !2
          7        ROPE_END                                      2  ~13     ~14, '%0A'
          8        ECHO                                                     ~13
   11     9        INIT_FCALL                                               'timezone_open'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $16     
         12        ASSIGN                                                   !5, $16
   12    13        INIT_FCALL                                               'date_create'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !5
         16        DO_ICALL                                         $18     
         17        ASSIGN                                                   !6, $18
   13    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'date_format'
         20        SEND_VAR                                                 !6
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                         $20     
         23        SEND_VAR                                                 $20
         24        DO_ICALL                                                 
   15    25        INIT_FCALL                                               'timezone_open'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $22     
         28        ASSIGN                                                   !5, $22
   16    29        INIT_FCALL                                               'date_create'
         30        SEND_VAR                                                 !2
         31        SEND_VAR                                                 !5
         32        DO_ICALL                                         $24     
         33        ASSIGN                                                   !6, $24
   17    34        INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'date_format'
         36        SEND_VAR                                                 !6
         37        SEND_VAR                                                 !4
         38        DO_ICALL                                         $26     
         39        SEND_VAR                                                 $26
         40        DO_ICALL                                                 
   19    41        ROPE_INIT                                     3  ~29     '%0AWinter%3A+'
         42        ROPE_ADD                                      1  ~29     ~29, !3
         43        ROPE_END                                      2  ~28     ~29, '%0A'
         44        ECHO                                                     ~28
   20    45        INIT_FCALL                                               'timezone_open'
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $31     
         48        ASSIGN                                                   !5, $31
   21    49        INIT_FCALL                                               'date_create'
         50        SEND_VAR                                                 !3
         51        SEND_VAR                                                 !5
         52        DO_ICALL                                         $33     
         53        ASSIGN                                                   !7, $33
   22    54        INIT_FCALL                                               'var_dump'
         55        INIT_FCALL                                               'date_format'
         56        SEND_VAR                                                 !7
         57        SEND_VAR                                                 !4
         58        DO_ICALL                                         $35     
         59        SEND_VAR                                                 $35
         60        DO_ICALL                                                 
   24    61        INIT_FCALL                                               'timezone_open'
         62        SEND_VAR                                                 !1
         63        DO_ICALL                                         $37     
         64        ASSIGN                                                   !5, $37
   25    65        INIT_FCALL                                               'date_create'
         66        SEND_VAR                                                 !3
         67        SEND_VAR                                                 !5
         68        DO_ICALL                                         $39     
         69        ASSIGN                                                   !7, $39
   26    70        INIT_FCALL                                               'var_dump'
         71        INIT_FCALL                                               'date_format'
         72        SEND_VAR                                                 !7
         73        SEND_VAR                                                 !4
         74        DO_ICALL                                         $41     
         75        SEND_VAR                                                 $41
         76        DO_ICALL                                                 
         77      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.47 ms | 1445 KiB | 17 Q