3v4l.org

run code in 500+ PHP versions simultaneously
<?php foreach (['en_US', 'ru_RU', 'es_ES', 'fa_IR'] as $locale) { $dateFormat = (new \IntlDateFormatter( $locale, \IntlDateFormatter::SHORT, \IntlDateFormatter::NONE ))->getPattern(); $formatWithLongYear = preg_replace( '/(?<!y)yy(?!y)/', 'Y', $dateFormat ); $formatter = new \IntlDateFormatter( $locale, \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, null, null, $formatWithLongYear ); echo $formatter->format(1455111783), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 32
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 32
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/00DEX
function name:  (null)
number of ops:  34
compiled vars:  !0 = $locale, !1 = $dateFormat, !2 = $formatWithLongYear, !3 = $formatter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                           $4      <array>, ->32
          1    > > FE_FETCH_R                                                   $4, !0, ->32
    4     2    >   NEW                                                  $5      'IntlDateFormatter'
    5     3        SEND_VAR_EX                                                  !0
    6     4        FETCH_CLASS_CONSTANT                                 ~6      'IntlDateFormatter', 'SHORT'
          5        SEND_VAL_EX                                                  ~6
    7     6        FETCH_CLASS_CONSTANT                                 ~7      'IntlDateFormatter', 'NONE'
          7        SEND_VAL_EX                                                  ~7
    4     8        DO_FCALL                                          0          
    8     9        INIT_METHOD_CALL                                             $5, 'getPattern'
         10        DO_FCALL                                          0  $9      
    4    11        ASSIGN                                                       !1, $9
   10    12        FRAMELESS_ICALL_3                preg_replace        ~11     '%2F%28%3F%3C%21y%29yy%28%3F%21y%29%2F', 'Y'
   13    13        OP_DATA                                                      !1
   10    14        ASSIGN                                                       !2, ~11
   16    15        NEW                                                  $13     'IntlDateFormatter'
   17    16        SEND_VAR_EX                                                  !0
   18    17        FETCH_CLASS_CONSTANT                                 ~14     'IntlDateFormatter', 'NONE'
         18        SEND_VAL_EX                                                  ~14
   19    19        FETCH_CLASS_CONSTANT                                 ~15     'IntlDateFormatter', 'NONE'
         20        SEND_VAL_EX                                                  ~15
   20    21        SEND_VAL_EX                                                  null
   21    22        SEND_VAL_EX                                                  null
   17    23        SEND_VAR_EX                                                  !2
   16    24        DO_FCALL                                          0          
         25        ASSIGN                                                       !3, $13
   24    26        INIT_METHOD_CALL                                             !3, 'format'
         27        SEND_VAL_EX                                                  1455111783
         28        DO_FCALL                                          0  $18     
         29        ECHO                                                         $18
         30        ECHO                                                         '%0A'
    3    31      > JMP                                                          ->1
         32    >   FE_FREE                                                      $4
   25    33      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.44 ms | 2173 KiB | 13 Q