PHP print Keyword
Definition and Usage
The print keyword is used to output a
string.
The print keyword always returns 1.
echo and print are more or less the same. They are both used to output data
to the screen.
The differences are small:
echohas no return value, whileprinthas a return value of 1 so it can be used in expressionsechocan take multiple parameters, whileprintcan take one argumentechois marginally faster thanprint
Related Pages
The echo keyword
❮ PHP Keywords