Skip to content

IPv6 in mysql address #9157

@genofire

Description

@genofire

there could be more then one : in it, so explode is no solution for it.

php > print_r (explode(":","[::1]:3306",2));
Array
(
    [0] => [
    [1] => :1]:3306
)

list($host, $portOrSocket) = explode(':', $host, 2);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions