php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64628 Tenere not working
Submitted: 2013-04-11 07:35 UTC Modified: 2013-04-11 07:43 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: robin at dragonito dot net Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.4.13 OS: Windows / Unix
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: robin at dragonito dot net
New email:
PHP Version: OS:

 

 [2013-04-11 07:35 UTC] robin at dragonito dot net
Description:
------------
The tenere does not the same as c style! I should by the same. Im working on language plural problems and found this while looking for examples to find out right plurals for some languages. Got the tenere from here:

http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms

In my example its for russian language.

See $cstyled for wrong result and $workaround for the right result. In $cstyled it doesnt the result 1 instead its 2.

Perhaps php does not c-style in this case, but i think its not correct how its results comming in this example.


Test script:
---------------
$cstyled = ($zahl%10==1 && $zahl%100!=11 ? 0 : $zahl%10>=2 && $zahl%10<=4 && ($zahl%100<10 || $zahl%100>=20) ? 1 : 2);

$workaround= ($zahl%10==1 && $zahl%100!=11 ? 0 : ($zahl%10>=2 && $zahl%10<=4 && ($zahl%100<10 || $zahl%100>=20) ? 1 : 2));


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-11 07:41 UTC] robin at dragonito dot net
-Package: SPL related +Package: Variables related
 [2013-04-11 07:41 UTC] robin at dragonito dot net
changed Package to variable dont find operators
 [2013-04-11 07:43 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is a design bug we can't fix anymore. use parenthesis.
 [2013-04-11 07:43 UTC] johannes@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jun 14 04:01:35 2025 UTC