0 votes
418 views
in PHP by (2.0k points)
edited

What is the difference between "echo" and "print" in PHP?

1 Answer

0 votes
by (2.0k points)
selected by
 
Best answer

Echo can output one or more string but print can only output one string and always returns 1.

Echo is faster than print because it does not return any value.

Related questions

0 votes
1 answer 388 views
asked Apr 9, 2022 in PHP by Doubtly (98.9k points)
0 votes
1 answer 334 views
asked Oct 9, 2022 in PHP by MrRam (2.0k points)
0 votes
1 answer 354 views
asked Oct 9, 2022 in PHP by MrRam (2.0k points)
0 votes
1 answer 334 views
asked Oct 9, 2022 in PHP by MrRam (2.0k points)
0 votes
1 answer 420 views
0 votes
1 answer 436 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

Recent Badges

Doubtly Earned a badge
Doubtly Earned a badge
laxman Ji Earned a badge

5.7k questions

5.1k answers

108 comments

648 users

...