As PHP manual stated 

> 
> As of PHP 7.0.0 calling a non-static method statically has been
>  generally deprecated (even if called from a compatible context).
> 
> 
> 

To check this statement-

I am calling a Non-static method outside a class then its generating error

```
class A{
    public function foo(){
        echo "testing<br/>";
    }
}
A::foo();

```

> 
> Deprecated: Non-static method A::foo() should not be called statically
> 
> 
> 

But when I am calling a Non-static method inside a class then its not generating `Deprecated error`

```
class A{
    public function foo(){
        echo "testing<br/>";
    }

    public function Display(){
        A::foo();    //calling a Non-static method inside statically
        self::foo(); //calling a Non-static method inside statically
    }
}
$obj=new A();
$obj->Display();

```

Does it deprecated only when calling statically from outside the class?