3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo INTL_ICU_VERSION . "\n"; $language = 'ru-RU'; $pattern = '{0, plural, =0{У вас нет новых сообщений} =1{У вас одно новое сообщение} one{У вас # непрочитанное сообщение} few{У вас # непрочитанных сообщения} many{У вас # непрочитанных сообщений} other{У вас # сообщений}}!'; $params = ['0' => 3]; $formatter = new \MessageFormatter($language, $pattern); if ($formatter === null) { echo "Invalid pattern: " . intl_get_error_code() . "\n" . intl_get_error_message(); } echo $formatter->format($params); echo "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/v5gf9
function name:  (null)
number of ops:  27
compiled vars:  !0 = $language, !1 = $pattern, !2 = $params, !3 = $formatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_CONSTANT                                   ~4      'INTL_ICU_VERSION'
          1        CONCAT                                           ~5      ~4, '%0A'
          2        ECHO                                                     ~5
    5     3        ASSIGN                                                   !0, 'ru-RU'
    6     4        ASSIGN                                                   !1, '%7B0%2C+plural%2C%0A++++%3D0%7B%D0%A3+%D0%B2%D0%B0%D1%81+%D0%BD%D0%B5%D1%82+%D0%BD%D0%BE%D0%B2%D1%8B%D1%85+%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D0%B9%7D%0A++++%3D1%7B%D0%A3+%D0%B2%D0%B0%D1%81+%D0%BE%D0%B4%D0%BD%D0%BE+%D0%BD%D0%BE%D0%B2%D0%BE%D0%B5+%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D0%B5%7D%0A++++one%7B%D0%A3+%D0%B2%D0%B0%D1%81+%23+%D0%BD%D0%B5%D0%BF%D1%80%D0%BE%D1%87%D0%B8%D1%82%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5+%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D0%B5%7D%0A++++few%7B%D0%A3+%D0%B2%D0%B0%D1%81+%23+%D0%BD%D0%B5%D0%BF%D1%80%D0%BE%D1%87%D0%B8%D1%82%D0%B0%D0%BD%D0%BD%D1%8B%D1%85+%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D1%8F%7D%0A++++many%7B%D0%A3+%D0%B2%D0%B0%D1%81+%23+%D0%BD%D0%B5%D0%BF%D1%80%D0%BE%D1%87%D0%B8%D1%82%D0%B0%D0%BD%D0%BD%D1%8B%D1%85+%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D0%B9%7D%0A++++other%7B%D0%A3+%D0%B2%D0%B0%D1%81+%23+%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D0%B9%7D%7D%21'
   13     5        ASSIGN                                                   !2, <array>
   15     6        NEW                                              $9      'MessageFormatter'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !3, $9
   16    11        TYPE_CHECK                                    2          !3
         12      > JMPZ                                                     ~12, ->21
   17    13    >   INIT_FCALL_BY_NAME                                       'intl_get_error_code'
         14        DO_FCALL                                      0  $13     
         15        CONCAT                                           ~14     'Invalid+pattern%3A+', $13
         16        CONCAT                                           ~15     ~14, '%0A'
         17        INIT_FCALL_BY_NAME                                       'intl_get_error_message'
         18        DO_FCALL                                      0  $16     
         19        CONCAT                                           ~17     ~15, $16
         20        ECHO                                                     ~17
   19    21    >   INIT_METHOD_CALL                                         !3, 'format'
         22        SEND_VAR_EX                                              !2
         23        DO_FCALL                                      0  $18     
         24        ECHO                                                     $18
   20    25        ECHO                                                     '%0A'
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.6 ms | 1443 KiB | 13 Q