They are language constructs (T_ECHO and T_EXIT), but different. You can use exit without parentheses, but not if you pass a value. Another feature is that the echo requires you not to use parentheses if you pass more than one value:
php > echo 'foo', 'bar'; foobar php > echo ('foo', 'bar'); PHP Parse error: syntax error, unexpected ',' in php shell code on line 1
If you now think, βBut that doesnβt really explain why the design is incompatible,β welcome to PHP.
source share