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
Loading...
Related Quiz
- 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?
- What happens if the condition in a PHP for loop is never false?
- Which of the following are common uses of superglobals in PHP?
- Which of the following are true about PHP data types?
- How does a PHP class implement an interface?