There are lots of ways to solve the issue of callback hells: 1 Modularization: break callbacks into independent functions 2 Use a control flow library, like async 3 Use generators with Promises 4 Use async/await (note that it is only available in the latest v7 release and not in the LTS version)
Correct Answer: On the server side, the main difference between GET and POST is where the submitted is stored The $_GET array stores data submitted by the GET method The $_POST array stores data submitted by the POST method On the browser side, the difference is that data submitted by the GET method will be displayed in the browser?s address field Data submitted by the POST method will not be displayed anywhere on the browser GET method is mostly used for submitting a small amount and less sensitive data POST method is mostly used for submitting a large amount or sensitive data
3. How can we know the number of days between two given dates using php?
Correct Answer: The difference lies with the execution of the languages PHP is server side scripting language, which means that it can?t interact directly with the user Whereas, JavaScript is client side scripting language, that is used to interact directly with the user
Correct Answer: Permissions in PHP are very similar to UNIX Each file has three types of permissions ? Read, write and execute Permissions can be changed using the change mode or CHMOD command CHMOD is followed by 3 digit number specifying the permission type CHMOD 777 is for Read, Write and execute Unnecessary permissions can be stripped off using UNMASK command Unmask (777);
10. Explain how to send large amounts of emails with php.
Correct Answer: The mail() function of PHP is quite robust for sending bulk emails A SMTP server can also be directly used from the script PHPmailer class can be used for sending emails