PHP Interview questions

Total available count: 33
Subject - PHP Frameworks
Subsubject - PHP

What is overriding in PHP?

PHP Overriding is very easy. As we know that overriding is process of modifying the inherited method. In case of inheritance you only need to create method with same name in your child class which you want to override. Below is the example of overriding of method in php. 

class SlightbookA
	public function IQ()
		echo Interview questions;
	public function MC()
		echo Multiple choices;
	class SlightbookB
		function MC($val) //overriding function MC
			echo "$val";

$val = new SlightbookB();
$val->MC("Interview questions");   //it will print Interview questions


Next 5 interview question(s)

What is overloading in PHP?
Does PHP support multiple inheritance?
Explain about various visibility in PHP?
What are Autoloading classes?
What is the difference between == and === in PHP?