3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( msgfmt_format_message('en_GB', 'Peter has {0, plural, =0{no cat} =1{a cat} other{# cats}}', [0]), msgfmt_format_message('en_GB', 'Peter has {0, plural, =0{no cat} =1{a cat} other{# cats #} {1]}', [1, 2]), msgfmt_format_message('en_GB', 'Peter has {0, plural, =0{no cat} =1{a cat} other{# cats}}', [2]) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lFm91
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
    3     1        INIT_FCALL_BY_NAME                                       'msgfmt_format_message'
          2        SEND_VAL_EX                                              'en_GB'
          3        SEND_VAL_EX                                              'Peter+has+%7B0%2C+plural%2C+%3D0%7Bno+cat%7D+%3D1%7Ba+cat%7D+other%7B%23+cats%7D%7D'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR                                                 $0
    4     7        INIT_FCALL_BY_NAME                                       'msgfmt_format_message'
          8        SEND_VAL_EX                                              'en_GB'
          9        SEND_VAL_EX                                              'Peter+has+%7B0%2C+plural%2C+%3D0%7Bno+cat%7D+%3D1%7Ba+cat%7D+other%7B%23+cats+%23%7D+%7B1%5D%7D'
         10        SEND_VAL_EX                                              <array>
         11        DO_FCALL                                      0  $1      
         12        SEND_VAR                                                 $1
    5    13        INIT_FCALL_BY_NAME                                       'msgfmt_format_message'
         14        SEND_VAL_EX                                              'en_GB'
         15        SEND_VAL_EX                                              'Peter+has+%7B0%2C+plural%2C+%3D0%7Bno+cat%7D+%3D1%7Ba+cat%7D+other%7B%23+cats%7D%7D'
         16        SEND_VAL_EX                                              <array>
         17        DO_FCALL                                      0  $2      
         18        SEND_VAR                                                 $2
         19        DO_ICALL                                                 
    6    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.51 ms | 1395 KiB | 15 Q