Which of the following is NOT a valid way to return multiple values from a PHP function?

  • Using an array
  • Using a class with multiple properties
  • Using a comma-separated string
  • Using multiple return statements
While using a comma-separated string is technically possible, it's not a good practice for returning multiple values. The other options are valid approaches for returning multiple values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *