3v4l.org

run code in 300+ PHP versions simultaneously
<?php $language = 'ru'; $pattern = '{0, plural, one{# час} few{# часа} many{# часов(many)} other{# часов(other)}}'; echo 'ICU:' . Intl::getIcuVersion() . "\n"; echo 'Data: ' . Intl::getIcuDataVersion() . "\n"; $formatter = new \MessageFormatter($language, $pattern); echo $result = $formatter->format([2]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnH8M
function name:  (null)
number of ops:  23
compiled vars:  !0 = $language, !1 = $pattern, !2 = $formatter, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ru'
    4     1        ASSIGN                                                   !1, '%7B0%2C+plural%2C+one%7B%23+%D1%87%D0%B0%D1%81%7D+few%7B%23+%D1%87%D0%B0%D1%81%D0%B0%7D+many%7B%23+%D1%87%D0%B0%D1%81%D0%BE%D0%B2%28many%29%7D+other%7B%23+%D1%87%D0%B0%D1%81%D0%BE%D0%B2%28other%29%7D%7D'
    6     2        INIT_STATIC_METHOD_CALL                                  'Intl', 'getIcuVersion'
          3        DO_FCALL                                      0  $6      
          4        CONCAT                                           ~7      'ICU%3A', $6
          5        CONCAT                                           ~8      ~7, '%0A'
          6        ECHO                                                     ~8
    7     7        INIT_STATIC_METHOD_CALL                                  'Intl', 'getIcuDataVersion'
          8        DO_FCALL                                      0  $9      
          9        CONCAT                                           ~10     'Data%3A+', $9
         10        CONCAT                                           ~11     ~10, '%0A'
         11        ECHO                                                     ~11
    9    12        NEW                                              $12     'MessageFormatter'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !2, $12
   10    17        INIT_METHOD_CALL                                         !2, 'format'
         18        SEND_VAL_EX                                              <array>
         19        DO_FCALL                                      0  $15     
         20        ASSIGN                                           ~16     !3, $15
         21        ECHO                                                     ~16
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.94 ms | 1394 KiB | 13 Q