The print statement in PHP always returns ______.

  • the output
  • 0
  • 1
  • TRUE
The print statement in PHP always returns 1. It is a unique feature compared to echo, which has a void return type. When using print, it outputs the specified string(s) and then returns 1. This can be useful in certain situations where you need to check if the print statement was successful or not. Learn more: https://www.php.net/manual/en/function.print.php
Add your answer
Loading...

Leave a comment

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