简体   繁体   中英

inet_ntop and IPv6 addresses and PHP 5.5

I have an error with PHP 5.5 that does not occured with PHP5.3 and 5.4. With IPv6 addresses, the function inet_ntop() throws me an error:

Invalid in_addr value.

You can look at my work on Github (function is in Network.php, line 88 ). You can also look at the test job on Travis-CI

Do you have any idea how to fix it?

Thank you for your help.

In fact, I did not use the function properly and it was sending malformed data. Works fine now, you can look at the corrected class here

Anyway, thank you for your answers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM