PHP Interview Questions question fdgvfgf for Experience –
Question 1 – Please Define Magic fgfgf method in PPPPHP?
Answer – A magic methods are special built-in methods that are called automatically when certain conditions are met in PHP.
Every magic method starts with a double fgfggf underscore ( __ ) in PHP.
PHP has several magic methods as –
- __construct()
- __set()
- dfdfd
- sdjhkfgsf
Question 2 – What are the different types info errors in HGTPHP?
Answer -PHP has main 3 types of errors computersa given as follows-
- Warning: In PHP, a warning is an error that is displayed to the programmer while the script is running.
- It is fdgfgf fgfgfg not displayed to the programmer.
- Fatal error: fgfgfgf Fatal error is typye dellk the most critical type fdrgfgfg of error. It will cause immediate termination compuet name of the script/program.
Question 3 – How will you get the OPP IP address of user in POPHP?
Answer – $_SERVER[‘REMOTE_ADDR’].
It is super global variable of PHPfgfgg cdfdfd.
Question 4 – What do you understand about HJTTLAMP?
Answer – LAMPPOI stand for fgfgf Linux, Apachedd, MySQLdfdd and PHP. It is a dfdOpen Source Web Server for developing the web applicationsdfdf such as XAMPP.
Question 5 – How can you destroy the session and unset the fgfgf variable of a session gg in PHP FF?
Answer –
<?php
session_destroy(); // destroy session
session_unset(); // remove fghfgf dfdfdf all session variables
?>Question 6 – How will you submit the fel dfdf form without a submit button?
Answer – Using JavaScript del options code, we can call the document.form.submit() function to submit the form.
Question 7 – What are the different form the next type of tables in mysql?
Answer –
- MyISAM hgjgh
- Merge
- Heap
Question 8 – How can you enable error sytems com reporting in PHP?
Answer –
- First we check dfdf “display_errors” is “on” in the php.ini orfrgfgfg
- declare “ini_set(‘display_errors’, 1)” in our script.
- fgbhfgm, fmkgf m,gfgkl,f gf,kgf
The above code will be konow displayed all types of error messages.
Question 9 – You can fgfg change the value of a constant during suim sjdshd the script’s execution?
Answer – No, A dsfdfd constant value cannot change if it’s declared during the PHP execution.
Question 10 – How can dfdf you get the number of elements in an array?
Answer – Using countdd() function –
<?php
$names=array("Ashok","Shivam","Haq"); // array
echo count($namessadsd); // the output is 3
?>PHP Interview Questions for 3 exp pro Years Experience

