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 difference between put and post method in http?

0 Answers  


How many columns can be added in a table in mysql?

0 Answers  


How do you use bcrypt for hashing passwords in php?

0 Answers  


Explain the importance of the function htmlentities.

0 Answers  


What is php resource type?

0 Answers  


Is php closing tag necessary?

0 Answers  


how to use between operator when retrieve from database(format-2008-jun-06)

3 Answers  


Which is incorrect with respect to separating php code and html?

0 Answers  


What are the different types of array in php?

0 Answers  


What is the difference between array_map () and array_shift ()?

0 Answers  


How to get a random value from a php array?

0 Answers  


What are new features in php 7?

0 Answers  


Categories