3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_timezone1(string $timezone) : string { $fmt = new IntlDateFormatter('en_US.utf8'); $res = $fmt->setTimeZone(new DateTimeZone($timezone)); if ($res === false) { var_dump($fmt->getErrorMessage()); } $fmt->setPattern('yyyy-MM-dd HH:mm'); return $fmt->format(time()); } var_dump(test_timezone1('Europe/Kiev')); var_dump(test_timezone1('Europe/Kyiv'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3A9uc
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'test_timezone1'
          2        SEND_VAL                                                 'Europe%2FKiev'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'test_timezone1'
          8        SEND_VAL                                                 'Europe%2FKyiv'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function test_timezone1:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/3A9uc
function name:  test_timezone1
number of ops:  31
compiled vars:  !0 = $timezone, !1 = $fmt, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        NEW                                              $3      'IntlDateFormatter'
          2        SEND_VAL_EX                                              'en_US.utf8'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    6     5        INIT_METHOD_CALL                                         !1, 'setTimeZone'
          6        NEW                                              $6      'DateTimeZone'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $6
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !2, $8
    7    12        TYPE_CHECK                                    4          !2
         13      > JMPZ                                                     ~10, ->19
    8    14    >   INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'getErrorMessage'
         16        DO_FCALL                                      0  $11     
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                                 
   10    19    >   INIT_METHOD_CALL                                         !1, 'setPattern'
         20        SEND_VAL_EX                                              'yyyy-MM-dd+HH%3Amm'
         21        DO_FCALL                                      0          
   11    22        INIT_METHOD_CALL                                         !1, 'format'
         23        INIT_FCALL                                               'time'
         24        DO_ICALL                                         $14     
         25        SEND_VAR_NO_REF_EX                                       $14
         26        DO_FCALL                                      0  $15     
         27        VERIFY_RETURN_TYPE                                       $15
         28      > RETURN                                                   $15
   12    29*       VERIFY_RETURN_TYPE                                       
         30*     > RETURN                                                   null

End of function test_timezone1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.04 ms | 1019 KiB | 17 Q