Doc #74417 [NEW]: long2ip() is documented to accept a string, but TypeError thrown with strings
| From: | vedad at kajtaz dot net | Date: | Tue, 11 Apr 2017 16:20:53 +0000 |
| Subject: | Doc #74417 [NEW]: long2ip() is documented to accept a string, but TypeError thrown with strings | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-14611@lists.php.net to get a copy of this message | ||
From: vedad at kajtaz dot net
Operating system: FreeBSD 11.0
PHP version: 7.1.3
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:long2ip() is documented to accept a string, but TypeError thrown with strings
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 bug report at https://bugs.php.net/bug.php?id=74417&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74417&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74417&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74417&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74417&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74417&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74417&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74417&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74417&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74417&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74417&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74417&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74417&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74417&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74417&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74417&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74417&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74417&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74417&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74417&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74417&r=mysqlcfg