Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


"$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 the difference between associative array and indexed array?

0 Answers  


What are the method available in form submitting?

0 Answers  


Explain how can we increase the execution time of a php script?

0 Answers  


What is move_uploaded_file in php?

0 Answers  


How do I escape in php?

0 Answers  






What software is required to run php?

0 Answers  


Does wordpress still use php?

0 Answers  


How can you declare the array in php?

0 Answers  


Is it possible to remove the html tags from data?

0 Answers  


Here in this site i could not find the details for php ZEND certifications or i think u did not post any ? so i need the information about the php certification how to prepare and some of the mock exams?

1 Answers  


What is escaping to php?

0 Answers  


What is mysqli_query?

0 Answers  






Categories