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

 ID:                 64628
 User updated by:    robin at dragonito dot net
 Reported by:        robin at dragonito dot net
 Summary:            Tenere not working
 Status:             Open
 Type:               Bug
-Package:            SPL related
+Package:            Variables related
 Operating System:   Windows / Unix
 PHP Version:        5.4.13
 Block user comment: N
 Private report:     N

 New Comment:

changed Package to variable dont find operators


Previous Comments:
------------------------------------------------------------------------
[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