<?php
class Foo
{
public static $my_static = 'foo';
public function staticValue() {
return $this->$my_static;
}
}
$bar = new Foo;
echo $bar->my_static;
Notice: Accessing static property Foo::$my_static as non static in /in/ltL16 on line 15
Warning: Undefined property: Foo::$my_static in /in/ltL16 on line 15
Notice: Accessing static property Foo::$my_static as non static in /in/ltL16 on line 15
Notice: Undefined property: Foo::$my_static in /in/ltL16 on line 15
Strict Standards: Accessing static property Foo::$my_static as non static in /in/ltL16 on line 15
Notice: Undefined property: Foo::$my_static in /in/ltL16 on line 15
Output for 4.4.2 - 4.4.9
<br />
<b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/ltL16</b> on line <b>4</b><br />
Process exited with code 255.
<br />
<b>Parse error</b>: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/ltL16</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br />
<b>Parse error</b>: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in <b>/in/ltL16</b> on line <b>4</b><br />
Process exited with code 255.