Doc #74417 [Com]: long2ip() is documented to accept a string, but TypeError thrown with strings

From: Date: Thu, 20 Apr 2017 14:32:57 +0000
Subject: Doc #74417 [Com]: long2ip() is documented to accept a string, but TypeError thrown with strings
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14648@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74417&edit=1 ID: 74417 Comment by: indan at nul dot nu Reported by: vedad at kajtaz dot net Summary: long2ip() is documented to accept a string, but TypeError thrown with strings Status: Open Type: Documentation Problem Package: Documentation problem Operating System: FreeBSD 11.0 PHP Version: 7.1.3 Block user comment: N Private report: N New Comment: Same problem with a 32-bit version of PHP 7.1.4 on Windows. The 64-bit version of PHP 7.1.4 on Linux does not have this problem, so maybe it is only a bug in the 32-bit version of PHP. Probably introduced by commit: http://git.php.net/?p=php-src.git;a=commit;h=9b148d31d3e19ce8c726ebbab3ba6a9a24979a2f As far as I know, I don't have strict types enabled. Previous Comments: ------------------------------------------------------------------------ [2017-04-11 16:20:50] vedad at kajtaz dot net Description: ------------ The long2ip() signature in documentation is: string long2ip ( string $proper_address ) Yet, as of PHP 7.1 (unlike PHP 7.0) TypeError is thrown with strict_types=1 when a string is provided: PHP Fatal error: Uncaught TypeError: long2ip() expects parameter 1 to be integer, string given in ... Related bug reports: #65017 and #71100 Test script: --------------- declare(strict_types=1); long2ip('2130706433'); Actual result: -------------- PHP Fatal error: Uncaught TypeError: long2ip() expects parameter 1 to be integer, string given in ... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74417&edit=1

« previous php.doc.bugs (#14648) next »