0.0.0.0 & iplong()

From: Date: Mon, 04 Jun 2012 16:54:58 +0000
Subject: 0.0.0.0 & iplong()
Groups: php.general 
Request: Send a blank email to php-general+get-318147@lists.php.net to get a copy of this message
Not sure if this is a bug or not... I have run into an error when performing a conditional using iplong() and the ~ bitwise operator $ip = '0.0.0.0'; $mask = '24'; $end = (ip2long($ip) || (~ip2long($mask))) + 1; PHP Fatal error: Unsupported operand types I even tried to typecast the mask to (int)

« previous php.general (#318147) next »