Skip to content

Commit 1d4d380

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 b4e3c0c commit 1d4d380

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)