Doc #65366 [Com]: [DE] ip2long(): 64/32-bit difference not documented
Edit report at https://bugs.php.net/bug.php?id=65366&edit=1
ID: 65366
Comment by: marc at ermshaus dot org
Reported by: pinkgothic at gmail dot com
Summary: [DE] ip2long(): 64/32-bit difference not documented
Status: Open
Type: Documentation Problem
Package: Translation problem
Operating System: -
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
A translation that is (kinda) equivalent to the current English original:
âDa der Integertyp von PHP vorzeichenbehaftet ist und auf 32-Bit-Architekturen viele
IP-Adressen in einen negativen Integerwert aufgelöst werden, sollten Sie dort die
Formatierungsangabe "%u" für sprintf() und printf() verwenden, um eine
Stringrepräsentation der vorzeichenlosen IP-Adresse zu erhalten.â
Small change, only the âauf 32-Bit-Architekturenâ part and âdortâ have to be
added.
Previous Comments:
------------------------------------------------------------------------
[2013-07-31 09:25:38] pinkgothic at gmail dot com
Description:
------------
"Because PHP's integer type is signed, and many IP addresses will result in
negative integers on 32-bit architectures, you need to use the "%u" formatter of
sprintf() or printf() to get the string representation of the unsigned IP
address."
...is part of the current English documentation of ip2long() and mentions the
difference between architectures (see also Bug #54338). The German translation,
however, says:
"Da der Integertyp von PHP vorzeichenbehaftet ist und viele IP-Adressen in einen
negativen Integerwert aufgelöst werden, sollten Sie die Formatierungsangabe "%u"
für sprintf() und printf() verwenden, um eine Stringrepräsentation der
vorzeichenlosen IP-Adresse zu erhalten."
...which makes no mention of the 32-bit/64-bit difference (but is otherwise a
correct translation). Could the distinction be added?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65366&edit=1
Thread (3 messages)