What will be the output of following code
This set of PHP Multiple Choice Questions & Answers (MCQs) focuses on “Functions”. 1. How to define a function in PHP? Answer: d 2. Type Hinting was introduced in which version of PHP? Answer: b 3. Which type of function call is used in line 8 in the following PHP code? a) Call By Value Answer: a 4. What will be the output of the following PHP code?
a) Error Answer: c 5. Which of the following are valid function names? i) function() ii) €() iii) .function() iv) $function() a) Only i) Answer: b 6. What will be the output of the following PHP code?
a) I am a Answer: a 7. What will be the output of the following PHP code?
a) I am b Answer: c 8. What will be the output of the following PHP code?
a) helloblabla Answer: c 9. A function in PHP which starts with __ (double underscore) is known as __________ Answer: a 10. What will be the output of the following PHP code?
a) Error Answer: d Sanfoundry Global Education & Learning Series – PHP Programming. To practice all questions on PHP Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on PHP. Next Steps:
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn. Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses. What will be the output1. What will be the output of the following PHP code? Explanation: If you need to output something onto the screen you'll need to use echo or print_r.
What will be the output of following PHP code ?Solution(By Examveda Team)
The chr() function returns a character from the specified ASCII value. Since the ASCII value of 4 is 52, thus 4 was displayed.
What will be the outputExplanation: This will be the output- Fatal error: Call to undefined function b().
What is an inner function in PHP?In PHP inner functions are global and hence behave in the same way as if they had been declared outside of any containing function.
|