Question 6
You want to parse a URL into its single parts. Which function do you choose?
- parse_url()
- url_parse(0
- get_url_parts()
- geturlparts()
Question 7
What is the output of the following code?
- This is text
- $text
- $text1
- $text2
Question 8
What function can be used to retrieve an array of current options for a stream context?
- stream_get_options()
- stream_context_get_default()
- stream_context_get_options()
- The ‘options’ element of the stream_get_meta_data() return value
Question 9
Given the following array: Which function will remove the value 28 from $a?
- array_shift()
- array_pop()
- array_pull()
- array_unshift()
Question 10
When would you use classes and when would you use namespaces?
- Use classes to encapsulate code and represent objects, and namespaces to avoid symbol name collisions
- Use classes for performance-sensitive code, and namespaces when readability matters more
- Use namespaces for performance-sensitive code, and classes when readability matters more
- Always use them; namespaces as always superior to classes