| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2010-01-21 10:35 UTC] bschussek at gmail dot com
  [2010-01-21 12:07 UTC] jani@php.net
  [2010-01-21 18:09 UTC] stas@php.net
  [2010-01-22 00:48 UTC] bschussek at gmail dot com
  [2010-06-16 01:20 UTC] stas@php.net
 
-Status: Assigned
+Status: Bogus
  [2010-06-16 01:20 UTC] stas@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 03:00:01 2025 UTC | 
Description: ------------ When a message formatter formats choices with nested variables, its behaviour is buggy. Interestingly, the code below works if you insert the parameter "{1}" once more outside of the choice: 'There are {0,choice,0#are no {1} files|1#is one {1} file} ok {1}' produces There are are no text files ok text There are is one image file ok image Reproduce code: --------------- $fmt = MessageFormatter::create('en_GB', 'There are {0,choice,0#are no {1} files|1#is one {1} file} ok'); echo $fmt->format(array(0, "text")), "\n"; echo $fmt->format(array(1, "image")), "\n"; Expected result: ---------------- There are are no text files ok There are is one image file ok Actual result: -------------- There are are no {1} files ok There are is one {1} file ok