I would declare a private var in my class with a specific type like this :
class MyClass
{
private (int) $myvar;
private (MyObject) $instance;
function __construct()
{
$this->myvar = 2;
$this->instance = new MyObject;
}
}
But it doesn't work and it seems there is no way to do what I want.