Answer Posted / 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 View All Answers
Can we override magic methods in php?
What are the difference between overloading and overriding in oops?
What is prepared statement in php?
What should we do to be able to export data into an excel file?
What is a null coalescing operator in php7?
How to access a Static Member of a Class in PHP?
Is php free to use?
Is php an object or array?
What are the php variables?
Is php faster than python?
Tell me what is the use of "enctype" attribute in a html form?
What are the popular frameworks in php?
What are the benefits of composer?
Does php class need constructor?
Which function is used to read a single character from a file in PHP.