Re: & behaves differently
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: & behaves differently

From: Oli Filth <catch@olifilth.co.uk>
Date: Sun Mar 05 2006 - 23:24:07 CET

fritz-bayer@web.de said the following on 05/03/2006 21:06:
> Hi Dana,
>
> the complete code of the php, which I`m supposed to port to perl can be
> found at http://www.googlecommunity.com/scripts/google-pagerank.php
>
> It actually computes the pagerank of a website. Most of the script is
> calculating a checksum, which is needed to calculate the pagerank.
>
> It's really strange the code, but my job is just to port it, but it's
> not so easy as you can see?
>

Basically, PHP doesn't do unsigned arithmetic. This algorithm probably
originated in C or something similar, where you can specify unsigned
data types and everything will work fine. The implementation this guy
created relies on the current conversions occurring in PHP; on a 64-bit
platform this would probably fail.

However:

http://tumanov.com/entry/209
It's talking about VBScript, but the problem he describes is identical.

-- 
Oli
Received on Mon May 1 02:28:06 2006