Re: [DISCUSSION] Native UUID support in PHP
| From: | Ben Ramsey | Date: | Mon, 16 Mar 2020 16:31:47 +0000 |
| Subject: | Re: [DISCUSSION] Native UUID support in PHP | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109071@lists.php.net to get a copy of this message | ||
> On Mar 16, 2020, at 11:22, Aran Reeks <cdtreeks@gmail.com> wrote:
>
> Hi Ben,
>
> Thanks for the feedback, I wasn't aware of net_get_interfaces, but that's really
> helpful and agree that post your patch, implementing a get_network_mac_addr() function (or similar
> name) would be amazing.
>
net_get_interfaces() returns an array that looks like this, so patching this wouldn’t introduce a
new method but, rather, modify this array to include a key named “mac,” which (I think) it
already does on Windows but not on Linux.
[
"lo" => [
"unicast" => [
[
"flags" => 65609,
"family" => 17,
],
[
"flags" => 65609,
"family" => 2,
"address" => "127.0.0.1",
"netmask" => "255.0.0.0",
],
],
"up" => true,
],
"tunl0" => [
"unicast" => [
[
"flags" => 128,
"family" => 17,
],
],
"up" => false,
],
"ip6tnl0" => [
"unicast" => [
[
"flags" => 128,
"family" => 17,
],
],
"up" => false,
],
"eth0" => [
"unicast" => [
[
"flags" => 69699,
"family" => 17,
],
[
"flags" => 69699,
"family" => 2,
"address" => "172.17.0.2",
"netmask" => "255.255.0.0",
"broadcast" => "172.17.255.255",
],
],
"up" => true,
],
]
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc