Which of the following is NOT a valid way to use a namespace in PHP?
- 'use' statement in a class
- Global namespaces
- Alias namespaces
- 'namespace' declaration within a class
In PHP, there are global namespaces, and using the 'use' statement in a class allows you to access classes from those namespaces. The global namespace does exist, so Option 2 is incorrect.
Loading...
Related Quiz
- Which of the following software stacks include PHP?
- You are writing a PHP script and you need to store multiple values in a single variable for easy manipulation. How would you do this using an array?
- You have been asked to set up a local development environment for PHP. What steps would you take?
- The foreach loop in PHP is used exclusively for arrays.
- In a scenario where you have a form with multiple checkboxes having the same name, how are the values sent to the PHP server?