Skip to content

gethostbyaddr outputs binary string #7748

Closed
@RobertEcker

Description

@RobertEcker

Description

PHP 8.1.0
The following code:

<?php
var_dump(gethostbyaddr('89.222.225.0'));
var_dump(gethostbyaddr('192.88.99.1'));

Resulted in this output:
Snap1

But I expected this output instead:

string(12) "89.222.225.0" (which is still shown when I use PHP 8.0.3)
string(12) "192.88.99.1"

PHP Version

PHP 8.1.0

Operating System

Windows 10 (x64)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions