LinkedIn PHP Skill Quiz Assessment Answers 2022

Exam Name: LinkedIn PHP Skill Quiz

Exam URL: https://www.linkedin.com/skill-assessments/PHP/quiz-intro/

  1. What does this code output?
  2. Which is the most secure way to avoid storing a password in clear text in database?
  3. What does this script do?
  4. In the following script, which line(s) will cause an error(s)?
  5. In a conditional statement, you want to execute the code only if both value are true. Which comparison operator should you use?
  6. All variables in PHP start with which symbol?
  7. What is a key difference between GET and POST?
  8. The **_ operator is useful for sorting operations. It compares two values and returns an integer less than, equal to, or greater than 0 depending on whether on whether the value on the _**is less than, equal to, or greater than the other.
  9. Which are valid PHP error handling keywords?
  10. Which value equates to true?
  11. What is missing from this code, which is supposed to create a test cookies?
  12. What is the value of $total in this calculation?
  13. What is the purpose of adding a lowercase “u” as a modifier after the final delimiter in a Perl-compatible regular expression?
  14. Which code snippet uses the correct syntax for creating an instance of the Pet class?
  15. What is the best way to explain what this script does?
  16. Which is the correct format for adding a comment to a PHP script?
  17. PHP supports multiple types of loops. If you wanted to loop through a block of code if and as long a specified condition is true, which type of loop would you use?
  18. The ignore_user_abort( ) function sets whether a client disconnect should abort a script execution. In what scenario would you, as a web developer, use this function?
  19. The PHP function array_reduce() takes a callback function that accepts a value carried over each iteration and the current item in the array, and reduces an array to a single value. Which code sample will sum and output the values in the provided array?
  20. Which PHP script uses a constructor to display the string “Winter is almost over!”?
  21. How might you troubleshoot a “call to undefined function” error?
  22. Which line could you NOT use to comment out “Space: the final frontier”?
  23. What displays in a browser when the following code is written?
  24. Which operator would you use to find the remainder after division?
  25. What is the significance of the three dots in this function signature?
  26. Assuming the Horse class exists, which is a valid example of inheritance in PHP?
  27. Both triple === and double == can be used to **_ variables in php. If you want to hear that string “33” and the number 33 are equal, you would use ** . If you want to check if an array contains a particular string value at a particular index, you would use ___
  28. Your php page is unexpectedly rendering as totally blank. Which step will shed light on the problem?
  29. Which is the way to create an array of “seasons”?
  30. Both self and this are keywords that can be used to refer to member variables of an enclosing class. The difference is that $this->member should be used for __ members and self::$member should be used for __ members.
  31. What will this code print?
  32. You are using the following code to find a users band, but it is returning false. Which step(s) would solve the problem?
  33. Which code would you use to print all the elements in an array called $cupcakes?
  34. What is the cause of ‘Cannot modify header information – headers already sent’?
  35. Which php control structure is used inside a loop to skip the rest of the current loops code and go back to the start of the loop for the next iteration
  36. The php not operator is !. Given the snippet, is there an out put and what is it?
  37. You want to list the modules available in your PHP installation. What command should you run?
  38. For the HTML form below, what is the correct functioning script that checks the input “mail” to be sure it is filled before proceeding?
  39. What is the value of ‘$result’ in this calculation?
  40. What is the job of the controller as a component in MVC?
  41. Why does this code trigger an error?
  42. A PDO object called $db has been set up to use for database operations, including user authentication. All user-related properties are set. The script line public function __construct(&$db) shows a constructor that initializes all user-related properties to ____ if no user has logged in. These parameters will be properly set by the login functions when a user logs in.
  43. Assuming that $first_name and $family_name are valid strings, which statement is invalid?
  44. Which code snippet demonstrates encapsulation?
  45. The following XML document is in books.xml. Which code will output “Historical”?
  46. Where is PHP code executed?
  47. Which command will extract the domain suffix (“com”) from the string $string = “https://cat-bounce.com”;?
  48. Which PHP variable name is invalid?
  49. What are the recommended settings in the PHP configuration file, php.ini, for a testing environment?
  50. What are getters and setters?
  51. Why should you follow a PSR standard?
  52. You are using the following code to decide if a button is clicked, but it is never returning true. Which step is most likely to shed light on the problem?
  53. If you want to pass a formfield to another page when a button is clicked, you should use the ** . If you want to store information across multiple pages, you should use the ** ?
  54. What would be a good name for this function?
  55. When it comes to the value of a variable, what is the difference between NULL and empty?
  56. Which is the most complete list of data types that PHP supports?
  57. In PHP 7, What is the correct way to import multiple classes from namespace in a single declaration ?!
  58. What is the resulting output of this for statement?
  59. Which PHP script finds the earliest and latest dates from an array?
  60. Which script might be used to continue a user’s search for music, across different webpages?
  61. Imagine a web application, built following a MVC architecture, that contains a quiz and a button to score it, When the user presses the Score button, which component should handle the request?
  62. A PHP “variable variable” takes the value of a variable and treats that as the name of a variable. For example, if $var is a variable then $$var is a variable variable whose name is the value of $var. Which script produces the output below, using variable variables?
  63. When should this php script be used?
  64. What below script will print?
  65. Which is not a valid magic constant?
  66. Why is it not recommended to make all of a class’s variables public?
  67. Which two functions can sanitize text and validate text formats?
  68. What is the correct way to include the file gravy.php in the middle of HTML code?
  69. What are some of the main types of errors in PHP?
  70. Your site must allow uploading of large files. What might you need to do?
  71. Which code will return the IP address of the client?
  72. DRY (Don’t Repeat Yourself) is a principle of software development aimed at reducing repetition of software patterns. Which choice is not a way to write DRYer code with PHP?
  73. Describe what happens if you run this code in a testing environment:
  74. Which superglobal variable holds information about headers, paths, and script locations?
  75. What type of computer language is PHP?
  76. Which is not true of the toString() in PHP?
  77. Is the output of this code in descending order, shown vertically, and with spaces between numbers? And what is the output?
  78. Which function can you use in error handling to stop the execution of a script and is equivalent to exit()?
  79. Which are types of control structures in PHP?
  80. Which loop displays all numbers from 1 to 10 inclusive?
  81. You want to find out what day Twelfth Night falls on after Christmas 2018. Which code should you use?
  82. Assume that $r is 255, and $g and $b are both 0. What is the correct code to output “#ff0000”?
  83. Create an associative array using $array1 as the keys and $array2 as the values:
  84. You want to use wildcard characters when searching for records in a MySQL/MariaDB database using a PDO prepared statement. Which code should you use?
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment

Share via
G Certification Course We would like to show you notifications for the latest news and updates.
Dismiss
Allow Notifications
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend