Consider the following simple code snippet:
<!DOCTYPE html>
<html>
<body>
<?php
$x = 5;
$y = 4;
echo print $x + $y;
?>
</body>
</html>
The output is below :
91
Now consider the other similar code snippet:
<!DOCTYPE html>
<html>
<body>
<?php
$x = 5;
$y = 4;
print echo $x + $y;
?>
</body>
</html>
The output is below :
*a blank white screen*
Why so?
If echo and print can be used in a one statement why can't the reverse pattern works?
Please satisfy my query with good explanation.
Thanks.