3v4l.org

run code in 500+ PHP versions simultaneously
<?php $locale = "de"; $intlTimezone = \IntlTimeZone::createDefault(); $dateTimezone = $intlTimezone->toDateTimeZone(); $calendar = new \IntlGregorianCalendar($intlTimezone, $locale); $dateFormatter = \IntlDateFormatter::create($locale, 2, -1, $intlTimezone, $calendar, "dd.MM.y"); $time = DateTimeImmutable::createFromFormat("Y-m-d", "978-12-27", $dateTimezone); var_dump($time); var_dump($time->format("d.m.Y")); var_dump($dateFormatter->format($time));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tXVgn
function name:  (null)
number of ops:  43
compiled vars:  !0 = $locale, !1 = $intlTimezone, !2 = $dateTimezone, !3 = $calendar, !4 = $dateFormatter, !5 = $time
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'de'
    4     1        INIT_STATIC_METHOD_CALL                                      'IntlTimeZone', 'createDefault'
          2        DO_FCALL                                          0  $7      
          3        ASSIGN                                                       !1, $7
    5     4        INIT_METHOD_CALL                                             !1, 'toDateTimeZone'
          5        DO_FCALL                                          0  $9      
          6        ASSIGN                                                       !2, $9
    6     7        NEW                                                  $11     'IntlGregorianCalendar'
          8        SEND_VAR_EX                                                  !1
          9        SEND_VAR_EX                                                  !0
         10        DO_FCALL                                          0          
         11        ASSIGN                                                       !3, $11
    7    12        INIT_STATIC_METHOD_CALL                                      'IntlDateFormatter', 'create'
         13        SEND_VAR_EX                                                  !0
         14        SEND_VAL_EX                                                  2
         15        SEND_VAL_EX                                                  -1
         16        SEND_VAR_EX                                                  !1
         17        SEND_VAR_EX                                                  !3
         18        SEND_VAL_EX                                                  'dd.MM.y'
         19        DO_FCALL                                          0  $14     
         20        ASSIGN                                                       !4, $14
    9    21        INIT_STATIC_METHOD_CALL                                      'DateTimeImmutable', 'createFromFormat'
         22        SEND_VAL                                                     'Y-m-d'
         23        SEND_VAL                                                     '978-12-27'
         24        SEND_VAR                                                     !2
         25        DO_FCALL                                          0  $16     
         26        ASSIGN                                                       !5, $16
   10    27        INIT_FCALL                                                   'var_dump'
         28        SEND_VAR                                                     !5
         29        DO_ICALL                                                     
   11    30        INIT_FCALL                                                   'var_dump'
         31        INIT_METHOD_CALL                                             !5, 'format'
         32        SEND_VAL_EX                                                  'd.m.Y'
         33        DO_FCALL                                          0  $19     
         34        SEND_VAR                                                     $19
         35        DO_ICALL                                                     
   12    36        INIT_FCALL                                                   'var_dump'
         37        INIT_METHOD_CALL                                             !4, 'format'
         38        SEND_VAR_EX                                                  !5
         39        DO_FCALL                                          0  $21     
         40        SEND_VAR                                                     $21
         41        DO_ICALL                                                     
         42      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
151.43 ms | 2034 KiB | 14 Q