• Home
  • About

szehau's weblog

Life, Internet, Software, Gadgets, Programming and Investments

  • life log
  • internet
  • programming
  • software
  • working holiday
  • gadget
  • project

Archives for August 2005

PHP integer and float

I found a problem while trying to do some bitwise operations (e.g. 32 bits XOR) in PHP. Consider the following case:


$a = -3036738507; // stored in float type
$b = 98758; // stored in integer type
$c= ($a & 0xFFFFFFFF) ^ $b;

Note: In PHP, if you specify a number beyond the bounds of the integer type, it will be interpreted as a float instead.

[Read more…]

« Previous Page

Email News Letter

Sign up to receive updates daily and to hear what's going on with us

More Posts

5 Essential Things You Need To Have At Your Home During The COVID-19 Pandemic

June 1, 2021 22:15 By Sze Hau

LED Downlight

Troubleshooting A Flickering LED Downlight

February 13, 2016 00:29 By Sze Hau

Repair A Broken iPhone Lightning Cable

January 30, 2016 00:54 By Sze Hau

Blog Network

  • Personal Fincance Personal Finance – Personal Money Tips, Stock Investment, Small Business and Make Money Online
  • Snippet IT Information technology news, ideas and experiences and opinions