3v4l.org

run code in 300+ 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 = 35
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 35
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/00DEX
function name:  (null)
number of ops:  37
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>, ->35
          1    > > FE_FETCH_R                                               $4, !0, ->35
    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        INIT_FCALL                                               'preg_replace'
   11    13        SEND_VAL                                                 '%2F%28%3F%3C%21y%29yy%28%3F%21y%29%2F'
   12    14        SEND_VAL                                                 'Y'
   13    15        SEND_VAR                                                 !1
   10    16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
   16    18        NEW                                              $13     'IntlDateFormatter'
   17    19        SEND_VAR_EX                                              !0
   18    20        FETCH_CLASS_CONSTANT                             ~14     'IntlDateFormatter', 'NONE'
         21        SEND_VAL_EX                                              ~14
   19    22        FETCH_CLASS_CONSTANT                             ~15     'IntlDateFormatter', 'NONE'
         23        SEND_VAL_EX                                              ~15
   20    24        SEND_VAL_EX                                              null
   21    25        SEND_VAL_EX                                              null
   17    26        SEND_VAR_EX                                              !2
   16    27        DO_FCALL                                      0          
         28        ASSIGN                                                   !3, $13
   24    29        INIT_METHOD_CALL                                         !3, 'format'
         30        SEND_VAL_EX                                              1455111783
         31        DO_FCALL                                      0  $18     
         32        ECHO                                                     $18
         33        ECHO                                                     '%0A'
    3    34      > JMP                                                      ->1
         35    >   FE_FREE                                                  $4
   25    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.25 ms | 945 KiB | 14 Q