Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- net_get_interfaces IPv4 Loopback --SKIPIF-- <?php function_exists('net_get_interf..

Decoded Output download

--TEST--
net_get_interfaces IPv4 Loopback
--SKIPIF--
<?php
function_exists('net_get_interfaces') || print 'skip';
--FILE--
<?php

// Test that we have exactly one unicast address with the address 127.0.0.1
// On linux this will often be named "lo", but even that isn't guaranteed.

$ifaces = net_get_interfaces();

$found = false;
foreach ($ifaces as $iface) {
  foreach ($iface['unicast'] as $unicast) {
    if (($unicast['address'] ?? null) === '127.0.0.1') {
      $found = true;
      break 2;
    }
  }
}

var_dump($found);
if (!$found) {
  // Extra diagnostics!
  var_dump($ifaces);
}
?>
--EXPECT--
bool(true)

Did this file decode correctly?

Original Code

--TEST--
net_get_interfaces IPv4 Loopback
--SKIPIF--
<?php
function_exists('net_get_interfaces') || print 'skip';
--FILE--
<?php

// Test that we have exactly one unicast address with the address 127.0.0.1
// On linux this will often be named "lo", but even that isn't guaranteed.

$ifaces = net_get_interfaces();

$found = false;
foreach ($ifaces as $iface) {
  foreach ($iface['unicast'] as $unicast) {
    if (($unicast['address'] ?? null) === '127.0.0.1') {
      $found = true;
      break 2;
    }
  }
}

var_dump($found);
if (!$found) {
  // Extra diagnostics!
  var_dump($ifaces);
}
?>
--EXPECT--
bool(true)

Function Calls

None

Variables

None

Stats

MD5 0e26fa9b91a1a0dedc6f18b53171e99b
Eval Count 0
Decode Time 93 ms