"$this" what type of object it is?
Answers were Sorted based on User's Feedback
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 |
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 |
What is orm in php framework?
describe arguments in header in php?
How to send Email using PHP with MySQL in Linux Server?..
What is the difference between rest and soap?
How session manage in wordpress
Whats the difference between include() and require()?
What was the old name of php?
Who is the father of PHP and explain the changes in PHP versions?
13 Answers Befree, iMark Group, Netizen,
Why do we use session?
is 'easyphp' is compelete technology to design a phpmysql site?
Which is better session or cookie?
write the function to fetch a image from mysql databases (datatype blob).