Skip to content

Commit 7267213

Browse files
committed
Actually use the returned value
It seems on Unix, the behaviour is to convert integers into IP addresses, whereas Windows tries to resolve it. Regardless, it's silly to test what the type is, since it returns the unmodified hostname if it can't be resolved, so it'll always be a string, error or not.
1 parent 3dbfdf5 commit 7267213

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/tests/network/gethostbyname_error002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gethostbyname() function - basic type return error test
44
"Sylvain R." <sracine@phpquebec.org>
55
--FILE--
66
<?php
7-
var_dump(is_string(gethostbyname("1234567890")));
7+
var_dump(gethostbyname("1234567890"));
88
?>
99
--EXPECT--
10-
bool(true)
10+
string(12) "73.150.2.210"

0 commit comments

Comments
 (0)