0.0.0.0 & iplong()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux