Edit report at https://bugs.php.net/bug.php?id=64628&edit=1

 ID:                 64628
 Updated by:         johan...@php.net
 Reported by:        robin at dragonito dot net
 Summary:            Tenere not working
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Variables related
 Operating System:   Windows / Unix
 PHP Version:        5.4.13
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2013-04-11 07:41:24] robin at dragonito dot net

changed Package to variable dont find operators

------------------------------------------------------------------------
[2013-04-11 07:35:01] 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));



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64628&edit=1

Reply via email to