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 curl php?

0 Answers  


What is $_ server request_method == post?

0 Answers  


What is the functionality of the function html entities?

3 Answers  


What is difference between php and wordpress?

0 Answers  


What is cookie in php with example?

0 Answers  


What is session and Cokkies . How it works . tell some thing about Session_id()

0 Answers   Net Solution,


What is difference between print and echo in php?

0 Answers  


How to run a php script?

0 Answers  


Why triggers are used in mysql?

0 Answers  


What is the difference between InnoDb tables and MyIsam Tables in php

1 Answers  


What is the latest version of php?

0 Answers  


In How many ways can u represent Not equal?Give Syntax of all ways..

3 Answers  


Categories