|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33149 function inet_pton unavailable
Submitted: 2005-05-26 12:02 UTC Modified: 2009-01-09 10:28 UTC
From: h dot warmelink at planet dot nl Assigned: Kalle (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5CVS-2005-05-26 (dev) OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 12 = ?
Subscribe to this entry?

 [2005-05-26 12:02 UTC] h dot warmelink at planet dot nl
In the last couple of days the documentation on inet_pton has changed. It now states that PHP5 supports this function, but the function seems unavailable.
However, the direct use of inet_pton does not result in an error.

Reproduce code:
if (function_exists('inet_pton')) echo "yes!";
else echo "no...";

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-26 12:14 UTC]
Both inet_pton() and inet_ntop() are available only in HEAD (i.e. PHP 5.1).
 [2005-05-26 13:29 UTC]
They are available in PHP 5.0 too but they are available only if HAVE_INET_NTOP or HAVE_INET_NTOP is defined.
 [2005-05-26 14:09 UTC]
Actually, windows doesn't support this right now, but could (requires a little bit of glue).
Making this a change request--but having accurate docs would be good too.
 [2005-05-26 15:36 UTC]
Jakub, could you plz point me where inet_pton() is placed in 5.0 ?
I can find it in HEAD (see ext/standard/basic_functions.c), but it doesn't exist in 5.0.
 [2005-05-26 19:24 UTC]
I've added a note about windows to the manual.
In fact the function was added in PHP 5.1, so we have a bug in functable.
 [2009-01-09 10:28 UTC]
This have been implemented on Windows in 5.3
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 19:01:29 2024 UTC