Property 'x' of class 'y' is not declared STATIC

Sample code:

class y {
    public $x;
    //...
}
//...
echo("This is not correct:", y::$x); // Property 'x' of class 'y' is not declared STATIC
//...

Property of class is being accessed as it was static although it wasn't.