Which of the following is NOT a valid visibility keyword for properties and methods in PHP classes?
- Private
- Protected
- Public
- Final
'Final' is not a visibility keyword; it's used to indicate that a method or class cannot be extended or overridden. The valid visibility keywords are 'private,' 'protected,' and 'public.'
Loading...
Related Quiz
- In dynamic forms where fields can be added or removed by the user, the server-side processing in PHP should use the ________ function to ensure data integrity.
- You are writing a PHP script and you have a block of code that needs to be executed multiple times. How would you encapsulate this block of code into a function for reuse?
- What can be potential issues when sorting arrays in PHP?
- How can you validate a URL field in a PHP form?
- What are the three classes of errors that can occur in PHP?