src/Provider/Node/SystemNodeProvider.php
protected function getSysfs()
    {
        $mac = false;

        if (strtoupper(php_uname('s')) === 'LINUX') {
            $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT);

            if (empty($addressPaths)) {
                return false;
            }

            array_walk($addressPaths, function ($addressPath) use (&$macs) {
                $macs[] = file_get_contents($addressPath);
            });

            $macs = array_map('trim', $macs);

            // remove invalid entries
            $macs = array_filter($macs, function ($mac) {
                return
                    // localhost adapter
                    $mac !== '00:00:00:00:00:00' &&
                    // must match  mac adress
                    preg_match('/^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i', $mac);
            });

            $mac = reset($macs);
        }

        return $mac;
    }
protected function getSysfs()
    {
        $mac = false;

        if (strtoupper(php_uname('s')) === 'LINUX') {
            $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT);

            if (empty($addressPaths)) {
                return false;
            }

            array_walk($addressPaths, function ($addressPath) use (&$macs) {
                $macs[] = file_get_contents($addressPath);
            });

            $macs = array_map('trim', $macs);

            // remove invalid entries
            $macs = array_filter($macs, function ($mac) {
                return
                    // localhost adapter
                    $mac !== '00:00:00:00:00:00' &&
                    // must match  mac adress
                    preg_match('/^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i', $mac);
            });

            $mac = reset($macs);
        }

        return $mac;
    }
protected function getSysfs ( ) { $ mac = false ; if ( strtoupper ( php_uname ( 's' ) ) === 'LINUX' ) { $ addressPaths = glob ( '/sys/class/net/*/address' , GLOB_NOSORT ) ; if ( empty ( $ addressPaths ) ) { return false ; } array_walk ( $ addressPaths , function ( $ addressPath ) use ( & $ macs ) { $ macs [ ] = file_get_contents ( $ addressPath ) ; } ) ; $ macs = array_map ( 'trim' , $ macs ) ; // remove invalid entries $ macs = array_filter ( $ macs , function ( $ mac ) { return // localhost adapter $ mac !== '00:00:00:00:00:00' && // must match  mac adress preg_match ( '/^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i' , $ mac ) ; } ) ; $ mac = reset ( $ macs ) ; } return $ mac ; }
Returns mac address from the first system interface via the sysfs interface

@return string|bool
Returns mac address from the first system interface via the sysfs interface