what is scope of $this in php in oop

what is scope of $this in php,can we declare out side function , in class

class Blogs extends Controller

{

     public  $articlesmodel = $this->loadmodel('articlesmodel');
     public function index()
     {      
          if(!isset($_SESSION['user']['login_id'])){
            header("location:".URL);
           }
     }
}


Source: oop

Leave a Reply