Unit2 PHP MCQ
Unit2 PHP MCQ
Stay Tuned for Daily Quizzes on All 6th Semester Computer Group Subjects like
PHP, Python, MAD, and other
Online Quiz to help you in preparing for Online Exams, It covers Multiple Choice
Questions (MCQs) for 30 Marks
imp Links:
All Theory tutorials: https://bit.ly/3ihW2zX
a) https://www.cwipedia.in/2020/05/basic-graphic-concept-in-php.html
b) https://www.cwipedia.in/2020/05/creation-of-pdf-document-in-php.html
contact us on [email protected]
A. key
B. index
Both A and B
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 1/12
2. An array is created using an ________ function in PHP. * 1/1
A. array()
B. arrays()
C. array[]
A. Non-Linearly
B. Linearly
A. 1
B. 2
C. 3
D. 4
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 2/12
5. By default, the index of array in PHP starts from ______? * 1/1
A. 0
B. 1
C. -1
D. 2
C. Both A and B
i) arr[0] = "letsfindcourse";
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 3/12
8. Which in-built function will add value to the end of an array? 1/1
*
A. array_unshift()
B. into_array()
C. inend_array()
D. array_push()
A. count()
B. array_count()
C. array_count_values()
D. count_values()
10. Which function is used to extract data from the array and 1/1
stored into variables? *
A. implode()
B. explode()
C. extract()
D. get()
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 4/12
11. implode and explode functions of PHP are applied on 1/1
____________ *
A. strings
B. arrays
C. Both A and B
A. String
B. array
C. Intergers
D. List
13. Fill the blanks: the ________ function breaks a string into an 1/1
array *
A. extract()
B. explode()
C. implode()
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 5/12
14. The ________ function exchanges all keys with their 1/1
associated values in an array. *
A. Array_Exchange()
B. array_flip()
C. array_exch()
D. flip()
A. delete()
B. array_delete()
C. array_push()
D. unset()
E. remove()
16. How many sorting arrays functions are available in PHP? * 1/1
A. 4
B. 2
C. 5
D. 6
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 6/12
17. What is the output of * 2/2
C. Both A & B
D. Error
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 7/12
19. How to define a function in PHP? * 1/1
a) I am a
b) I am b I am a
c) Error
d) I am a Error
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 8/12
21. You can create an anonymous or lambda function 1/1
using_____________ *
A. lambda()
B. create_lambda()
C. create_function()
D. function()
C. format string
D. format number
C. string to uppercase
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=A… 9/12
24. What is the output of * 1/1
A. 0
B. -1
C. 1
D. error
A. *****
B. ****
C. 5X*
D. Error
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=… 10/12
26. what is the output of abs(-25) ? * 1/1
A. -25
B. 25
C. +25
D. 25.0
A. 10
B. 01
C. 1010
D. 2
C. Error
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=… 11/12
Feedback
Happy Learning!
cwipedia.in
This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy
Forms
https://docs.google.com/forms/d/e/1FAIpQLSdzn1DERAUcs366RohUJiq-jRtk5Lk-lb3qQOt6O2VYDrmgeg/viewscore?viewscore=… 12/12