Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


"$this" what type of object it is?

Answers were Sorted based on User's Feedback



"$this" what type of object it is?..

Answer / venky

$this represents the current working class.
if you are accessing the variable or function with in the
same class then $this represents the current working object.
for ex:

class Test{

function fn_testing($a)
{
$a++;
return $a;

}
$c=$this->fn_tesing(1);
}

Is This Answer Correct ?    6 Yes 1 No

"$this" what type of object it is?..

Answer / kapil dhiman

<?php
class DemoTesting{

public $val="India is great";

public function checkThis()
{
//$this-> object of current class
echo $this->val;

}

}

$obj= new DemoTesting();
$obj->checkThis();
?>

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More PHP Interview Questions

what is constructor in a class, how it is work, how it is call?

2 Answers  


What are the string functions in php?

0 Answers  


What is the difference between the include() and require() functions?

0 Answers  


how can I use bread crumb in PHP ?

2 Answers  


I am working in VFP with no knowledge of web programming.I want to learn web database programmin. Can I choose PHP and MYSQL for that?

2 Answers  


what is the post and get method??

14 Answers   Google,


How do I expire a php session after 30 minutes?

0 Answers  


how we can crop an image and how we can display it..

1 Answers   Satyam,


Hi all,, im completely new to PHP, started learning just 2 days before. Can anybody tell me how to run a PHP file to see the program's output? i have created some simple program in Dreamweaver CS3 but don't know how to run it...

1 Answers  


explain the changes in php version

3 Answers  


How to set a value in session? How to remove data from a session?

0 Answers  


can anyone explain oops concept in php or give website to learn this concept clearly?

2 Answers   Nadsoft, Satyam,


Categories