Basic Php — Part 2 MCQs with Explanations
Practice high-yield Programming & Software Development MCQs on Basic Php — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.
Questions
13
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
16 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
13
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress | 0/13 answered
✓ 0 correct
✗ 0 wrong
0% score
🎉 Set complete! All 13 questions answered.
Question 1 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Question 2 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
strval()
Question 3 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the limit of a PHP integer value?
Question 4 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
PHP considers the following values as False
Question 5 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
With the introduction of namespaces, the same function name can be used in multiple places.
Question 6 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Within a namespace, for accessing the built-in PHP classes you can prefix the class name with a . . . . . and let PHP look in the global class list.
Question 7 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the below namespace declaration is correct?
Question 8 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Multiple namespaces cannot be defined in the same file.
Question 9 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
As the namespace size grows, using namespaces can become a little repetitious, but PHP also provides the . . . . . statement, which allows you to alias a specific namespace.
Question 10 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Some PHP code might not have a namespace and therefore lives in the . . . . . . namespace.
Question 11 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
All classes in the same namespace or subnamespace don’t have to the declared in the same PHP file.
Question 12 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
It is possible to create a hierarchy of namespaces in PHP.
Question 13 of 13
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The value of __NAMESPACE__ is a string that contains the current namespace name. In global, un-namespaced code, it contains . . . . . .
✓ Link copied to clipboard
Continue Your Practice
Next Practice Set → Advance Html — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡 Examiner's Advisory for Programming & Software Development
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.