PHP Basic Questions

Use these questions to check the PHP basics covered in the introductory tutorials. Select one answer for each question, then choose Check answers to see your score and an explanation for every item.

1. Which construct is commonly used to output text in PHP?
2. Which is a valid PHP variable?
3. Which operator joins two strings in PHP?
4. Which superglobal normally contains values submitted by a form using method="post"?
5. Which loop is especially convenient for reading every element of an array?
6. Which operator checks that two values have both the same value and the same type?
7. Which function can check whether a variable is set and is not null?
8. Which function returns the number of elements in an array?
9. Which function is commonly used to safely display untrusted text inside HTML?
10. What is the practical difference between require and include when the requested file is missing?
11. What does the ?? operator help with?
12. Which approach should be used when user input becomes a value in an SQL query?

Review the PHP basics

If a question was difficult, review PHP introduction and basics, PHP variables, PHP loops, PHP arrays, and forms and validation before trying the quiz again.




Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer