3v4l.org

run code in 300+ PHP versions simultaneously
<?php $language = 'ru'; $pattern = '{0, plural, one{# час} few{# часа} many{# часов(many)} other{# часов(other)}}'; $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/GKmfq
function name:  (null)
number of ops:  13
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        NEW                                              $6      'MessageFormatter'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $6
    7     7        INIT_METHOD_CALL                                         !2, 'format'
          8        SEND_VAL_EX                                              <array>
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                           ~10     !3, $9
         11        ECHO                                                     ~10
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.98 ms | 1393 KiB | 13 Q