Reply to Re: [PHP] Strange Right-Shift Problem

Your name:

Reply:


Posted by Jochem Maas on 01/03/06 12:44

Curt Zirzow wrote:
> On Fri, Dec 30, 2005 at 12:34:35PM -0600, Richard Lynch wrote:
>
>>On Thu, December 29, 2005 5:37 pm, Michael Gross wrote:
>>

....

>>
>>If you can determine the number of bits on your system, you could use
>>a different number from 11 on the two systems to get the answer you
>>want.
>>
>>if (is_32_bit_machine()){
>> $y = $x >> 11;
>>}
>>else{
>> $y = $x >> 43; //11 + 32 (guess)
>>}
>>
>>One hack for detecting 32-bit machine might be this:
>
>
> Isn't php suppose to handle all this? This seems odd to me.

I don't see how php can 'handle' people assuming that integers will
always be 32bits - the php code in the encryption algorythm is flawed
because it assumes that all integers are 32bits and doesn't platform
wordsize (terminology?) into account - how can php know that this was
not the intention?

>
>
> Curt.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация