Difference between echo and print statement in php
Source link:
https://www.programmingquest.com/2019/04/difference-between-echo-and-print.html
1. echo Statement
* we can write echo statement with parenthesis like 'echo()' or without parenthesis 'echo'.
* In the echo we can pass multiple variable in comma separated form to see the output like 'echo $a,$b,$c;'
* echo doesn’t return any value
* echo is faster then print
2. Print Statement
* we can write print statement with parenthesis like 'print()' or without parenthesis 'print'.
* In the print we can not pass multiple variable in comma separated form like echo.
* print statement always returns 1.
* print is slower than echo
Also in PHP:
- console.log equivalent in php
- chrome see php echo
- adding days to data php
- How to use mbstring on Heroku (PHP)
- codeigniter 3 smtp email send
- date u 1 day php
- convert array to object php
- Class 'Intervention\Image\ImageServiceProvider' not found
- file upload permission in php
- cron job for backup in laravel 5.4
- How to display MySQL data dynamically using jQuery and PHP
- clear cache database laravel
- date weschools
- Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://vtl-lab.com/VN/crecc-cms/api/member/register.json. (Reason: CORS request did not succeed).
- add date ti particular date in php
- datetime in php
- composer php version command
- carbon random future date
- email in ctf
- date format in ph
- base64 to image
- check array item exists php
- command to create seed file in laravel
- error reporting php