Jnr PHP/Codeigniter Developer

  Home  Web Development  Jnr PHP/Codeigniter Developer


“Jnr PHP/Codeigniter Developer Frequently Asked Questions in various Jnr PHP/Codeigniter Developer job interviews by interviewer. The set of questions are here to ensures that you offer a perfect answer posed to you. So get preparation for your new job interview”



61 Jnr PHP/Codeigniter Developer Questions And Answers

42⟩ Tell me what are hooks in CodeIgniter?

Codeigniter’s hooks feature provides a way to change the inner working of the framework without hacking the core files. In other word, hooks allow you to execute a script with a particular path within the Codeigniter. Usually, it is defined in application/config/hooks.php file.

 170 views

48⟩ Tell me how you can prevent CodeIgniter from CSRF?

There are several ways to protect CodeIgniter from CSRF, one way of doing is to use a hidden field in each form on the website. This hidden field is referred as CSRF token; it is nothing but a random value that alters with each HTTP request sent. As soon as it is inserted in the website forms, it gets saved in the user’s session as well. So, when the form is submitted by the users, the website checks whether it is the same as the one saved in the session. If it is same then, the request is legitimate.

 199 views

49⟩ Tell me what are the main error types in PHP and how do they differ?

In PHP there are three main type of errors:

☛ Notices – Simple, non-critical errors that are occurred during the script execution. An example of a Notice would be accessing an undefined variable.

☛ Warnings – more important errors than Notices, however the scripts continue the execution. An example would be include() a file that does not exist.

☛ Fatal – this type of error causes a termination of the script execution when it occurs. An example of a Fatal error would be accessing a property of a non-existent object or require() a non-existent file.

 181 views

50⟩ Explain echo vs. print statement?

echo() and print() are functions in PHP, both output strings. Function echo() can take multiple expressions whereas print() cannot. Moreover print() returns true or false based on success or failure whereas echo doesn't.

 199 views

52⟩ Tell us what are the __construct() and __destruct() methods in a PHP class?

All objects in PHP have Constructor and Destructor methods built-in. The Constructor method is called immediately after a new instance of the class is being created, and it’s used to initialize class properties. The Destructor method takes no parameters.

Understanding these two in PHP means that the candidate knows the very basics of OOP in PHP.

 179 views

56⟩ Tell me what is Memcache?

Technology that caches objects in memory and the application can get to them really fast. It is the basis in scaling larger PHP application.

 185 views