ID:               42510
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jr-php2 at quo dot to
-Status:           Open
+Status:           Assigned
 Bug Type:         Strings related
 Operating System: Linux x86-64
 PHP Version:      5.2.4
-Assigned To:      
+Assigned To:      iliaa
 New Comment:

Assigned to Ilia who fixed bug #38770




Previous Comments:
------------------------------------------------------------------------

[2007-09-03 16:39:46] jr-php2 at quo dot to

> Are you actually using PHP 5.2.4?

Yes.

> (the bug you claim to be bogus was fixed already in 5.2.1..

Maybe I wasn't clear: I'm suggesting that the bug report *and* the fix
that went into 5.2.1 are bogus.

Result with PHP 5.2.0 (matches my "expected result"):

unpack = 3368601800
ip2long = 3368601800

Result with PHP 5.2.1-5.2.4:

unpack = -926365496
ip2long = 3368601800

> why didn't you report it earlier?!)

I didn't notice the problem until now.

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

[2007-09-03 08:14:48] [EMAIL PROTECTED]

Are you actually using PHP 5.2.4? (the bug you claim to be bogus was
fixed already in 5.2.1..why didn't you report it earlier?!)

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

[2007-09-02 20:06:52] jr-php2 at quo dot to

Digging deeper, it looks like 'V' and 'N' used to work as documented
until bug #38770 was "fixed in CVS".

Isn't #38770 a bogus report, though? Since 'N' is documented as being
unsigned, isn't the user wrong to expect it to return a negative result?

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

[2007-09-01 20:33:57] jr-php2 at quo dot to

Okay, looking at the unpack() code, it appears that:

- 'l' and 'L' are both treated as signed, even though 'l' is documented
as signed and 'L' is documented as unsigned.

- 'N' and 'V' are treated as signed, even though both are documented as
unsigned.

So who's right here, the code or the documentation?

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

[2007-09-01 17:26:12] jr-php2 at quo dot to

Sorry, I mixed up the expected and actual results.

It should say:

Expected result:
----------------
unpack = 3368601800
ip2long = 3368601800

Actual result:
--------------
unpack = -926365496
ip2long = 3368601800

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/42510

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

Reply via email to