Re: svn: /phpdoc/en/trunk/reference/strings/functions/ chr.xml
| From: | Nikita Popov | Date: | Sat, 02 Jul 2016 11:09:45 +0000 |
| Subject: | Re: svn: /phpdoc/en/trunk/reference/strings/functions/ chr.xml | ||
| References: | 1 2 3 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-14276@lists.php.net to get a copy of this message | ||
On Sat, Jul 2, 2016 at 12:56 PM, Christoph Becker <cmbecker69@gmx.de> wrote:
> On 02.07.2016 at 12:48, Peter Cowburn wrote:
>
> > On 1 July 2016 at 21:07, Christoph Michael Becker <cmb@php.net> wrote:
> >
> >> cmb Fri, 01 Jul 2016 20:07:17 +0000
> >>
> >> Revision:
> >> http://svn.php.net/viewvc?view=revision&revision=339537
> >>
> >> Log:
> >> Address #63510: Integer overflow with chr
> >>
> >> Bug: https://bugs.php.net/63510 (Assigned) Integer
> >> overflow with chr
> >>
> >> Changed paths:
> >> U phpdoc/en/trunk/reference/strings/functions/chr.xml
> >>
> >> Modified: phpdoc/en/trunk/reference/strings/functions/chr.xml
> >> ===================================================================
> >> --- phpdoc/en/trunk/reference/strings/functions/chr.xml 2016-07-01
> >> 09:07:57 UTC (rev 339536)
> >> +++ phpdoc/en/trunk/reference/strings/functions/chr.xml 2016-07-01
> >> 20:07:17 UTC (rev 339537)
> >> @@ -29,7 +29,8 @@
> >> <term><parameter>ascii</parameter></term>
> >> <listitem>
> >> <para>
> >> - The ascii code.
> >> + A number which is bitwise and'ed with 255 to retrieve the
> extended
> >> ASCII
> >> + code.
> >> </para>
> >>
> >
> > This shouldn't be the primary description of the parameter, but rather a
> > second paragraph stating what happens with values outside the normal
> range.
>
> Thanks. I'll fix it later today.
>
It might also help to rephrase this in terms of only using the lowest byte
or using "ascii % 256". I'm not sure if the significance of bitwise
operations on 2^n-1 values is common knowledge for PHP devs.
Nikita