<?php
$scan = "00:12:a9:54:f6:a7,Privacy,-52.00,3Com,6,30:91:8f:24:07:d0,RSN: Privacy,-85.00,CenturyLink3873,1,00:0c:e5:46:2d:74,ShortSlotTime,-92.00,WLAN,1,c0:3f:0e:57:87:e8,RSN: Privacy,-94.00,Megan-PC-Wireless,6,00:12:a9:54:f6:a7,ShortPreamble,-45.00,WLAN,7";
$escan = (explode(",",$scan));
$cscan = (array_chunk($escan, 5));
class d_object {
private $mac;
var $enc;
var $freq;
var $ssid;
var $channel;
function __construct ($payload)
{
if (is_array($payload))
$this->from_array($payload);
}
public function from_array($array)
{
foreach(get_object_vars($this) as $attrName => $attrValue)
$this->{$attrName} = $array[$attrName];
}
public function s_output ()
{
print "{$this->$mac}";
}
}
$device = new d_object($cscan);
$device->s_output();
?>
Warning: Undefined array key "mac" in /in/Sv58f on line 26
Warning: Undefined array key "enc" in /in/Sv58f on line 26
Warning: Undefined array key "freq" in /in/Sv58f on line 26
Warning: Undefined array key "ssid" in /in/Sv58f on line 26
Warning: Undefined array key "channel" in /in/Sv58f on line 26
Warning: Undefined variable $mac in /in/Sv58f on line 31
Warning: Undefined property: d_object::$ in /in/Sv58f on line 31
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Notice: Undefined property: d_object::$ in /in/Sv58f on line 31
Output for 7.3.32 - 7.3.33
Output for 7.0.0 - 7.0.20
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Fatal error: Uncaught Error: Cannot access empty property in /in/Sv58f:31
Stack trace:
#0 /in/Sv58f(36): d_object->s_output()
#1 {main}
thrown in /in/Sv58f on line 31
Process exited with code 255.
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Fatal error: Cannot access empty property in /in/Sv58f on line 31
Process exited with code 255.
Output for 5.1.3 - 5.1.6, 5.2.0 - 5.2.17
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Fatal error: Cannot access empty property in /in/Sv58f on line 31
Process exited with code 255.
Output for 5.0.5, 5.1.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 11
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 12
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 13
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 14
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Fatal error: Cannot access empty property in /in/Sv58f on line 31
Process exited with code 255.
Output for 5.0.4
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 11
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 12
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 13
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 14
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Notice: Undefined property: d_object::$ in /in/Sv58f on line 31
Output for 5.0.3
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 11
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 12
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 13
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 14
Notice: Undefined index: mac in /in/Sv58f on line 26
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Notice: Undefined property: d_object::$ in /in/Sv58f on line 31
Output for 5.0.0 - 5.0.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 11
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 12
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 13
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/Sv58f on line 14
Notice: Undefined index: enc in /in/Sv58f on line 26
Notice: Undefined index: freq in /in/Sv58f on line 26
Notice: Undefined index: ssid in /in/Sv58f on line 26
Notice: Undefined index: channel in /in/Sv58f on line 26
Notice: Undefined variable: mac in /in/Sv58f on line 31
Notice: Undefined property: d_object::$ in /in/Sv58f on line 31
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Sv58f on line 10
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Sv58f on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/Sv58f on line 10
Process exited with code 255.