"$this" what type of object it is?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why php is also called as scripting language?

543


Is php difficult to learn?

496


Why super () is used in java?

521


Which cryptographic extension provide generation and verification of digital signatures?

517


Is overloading possible in php?

509






What is the method to register a variable into a session?

480


How do we get the current session id?

544


List types of array are available in php?

542


Which PHP function would you use to send an email?

590


What is apache and php?

486


How does php work with apache?

514


What's the best method for sanitizing user input with php?

483


Explain NULL?

567


Tell me how can we display information of a variable and readable by human with php?

560


Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.

1699