Bug #64628 [NEW]: Tenere not working
| From: | robin at dragonito dot net | Date: | Thu, 11 Apr 2013 07:35:01 +0000 |
| Subject: | Bug #64628 [NEW]: Tenere not working | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-178399@lists.php.net to get a copy of this message | ||
From: robin at dragonito dot net
Operating system: Windows / Unix
PHP version: 5.4.13
Package: SPL related
Bug Type: Bug
Bug description:Tenere not working
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 bug report at https://bugs.php.net/bug.php?id=64628&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64628&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64628&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64628&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64628&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64628&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64628&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64628&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64628&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64628&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64628&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64628&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64628&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64628&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64628&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64628&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64628&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64628&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64628&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64628&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64628&r=mysqlcfg