3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 ($pl) { if (is_array($pl)) $this->from_array($pl); } public function from_array($cscan) { foreach(get_object_vars($this) as $attrName => $attrValue) $this->{$attrName} = $cscan[$attrName]; } public function s_output () { print "{$this->$mac}"; } } $device = new d_object($cscan); $device->s_output(); ?>
based on WG0iN
Output for 7.1.0 - 7.2.0
Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Notice: Undefined property: d_object::$ in /in/8ZKUa on line 31
Output for 7.0.0 - 7.0.20
Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Fatal error: Uncaught Error: Cannot access empty property in /in/8ZKUa:31 Stack trace: #0 /in/8ZKUa(36): d_object->s_output() #1 {main} thrown in /in/8ZKUa on line 31
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Fatal error: Cannot access empty property in /in/8ZKUa on line 31
Process exited with code 255.
Output for 5.1.3 - 5.2.17
Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Fatal error: Cannot access empty property in /in/8ZKUa on line 31
Process exited with code 255.
Output for 5.0.5 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 11 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 12 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 13 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 14 Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Fatal error: Cannot access empty property in /in/8ZKUa 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/8ZKUa on line 11 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 12 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 13 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 14 Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Notice: Undefined property: d_object::$ in /in/8ZKUa on line 31
Output for 5.0.3
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 11 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 12 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 13 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 14 Notice: Undefined index: mac in /in/8ZKUa on line 26 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Notice: Undefined property: d_object::$ in /in/8ZKUa on line 31
Output for 5.0.0 - 5.0.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 11 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 12 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 13 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/8ZKUa on line 14 Notice: Undefined index: enc in /in/8ZKUa on line 26 Notice: Undefined index: freq in /in/8ZKUa on line 26 Notice: Undefined index: ssid in /in/8ZKUa on line 26 Notice: Undefined index: channel in /in/8ZKUa on line 26 Notice: Undefined variable: mac in /in/8ZKUa on line 31 Notice: Undefined property: d_object::$ in /in/8ZKUa 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/8ZKUa on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/8ZKUa 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/8ZKUa on line 10
Process exited with code 255.