In PHP, echo or print is used for output on screen.

echoprint
Returns no valueReturns 1
Can be use with or without parenthesesCan be use with or without parentheses
Accept more than one parametersAccept only one parameter

echo examples

Display variable value

<?php
 $a = 30;
 echo $a;
?>

Display text

<?php
 $name = "PHP";
 echo $name;
?>

Print examples

Display variable value

<?php
 $a = 30;
 print $a;
?>

Display text

<?php
 $name = "PHP";
 print $name;
?>

echo and Print with or without parenthesis

<?php
 $a = 30;
 echo $a;

 $b = 20;
 echo($b);
?> 
<?php
 $a = 30;
 print $a;

 $b = 20;
 print($b);
?>

echo and Print without parenthesis does not required any space after echo or print.

<?php
 $a = 30;
 echo$a;
 print$a;
 
 echo"Hello";
 print"World";
?>