Failure in bitwise operations moving from 5.2.x to 5.3.x

From: Date: Tue, 15 Mar 2011 02:12:59 +0000
Subject: Failure in bitwise operations moving from 5.2.x to 5.3.x
Groups: php.general 
Request: Send a blank email to php-general+get-311848@lists.php.net to get a copy of this message
Greetings, I'm moving some scripts from an older server (SuSE who-knows-what, running PHP 5.2.5) to a newer one (Ubuntu 10.10, running PHP 5.3.2). For the most part there haven't been any problems, or they've been things that I was able to fix easily. This one's got me stumped. I have the following line in a script: $this->bc = ($this->network | (~$this->netmask)) & 4294967295; $this->network and $this->netmask should both be of type long, and I should wind up with another long. I didn't write the original method, and I can't remember what "bc" stands for at the moment, but it's part of a tool for working out first and last IP address, netmask, and a few other things from a subnet definition. On the old system, it works fine. On the new system, I get the following error: "PHP Fatal error: Unsupported operand types in /var/www/test/common_subnet.inc on line 39" I've done a little searching without any luck: if anyone can give me a quick answer, or at least point me to something that will explain what's going on, I'd appreciate it. Thanks, Alex McKenzie

« previous php.general (#311848) next »