Both include('file.php') and include 'file.php' work and seem to be interchangeable.
Does anyone know if there is any difference between the two syntaxes? Performance? Introduced in a particular version?
I know if you’re going to write include $_SERVER['DOCUMENT_ROOT'] . '/file.php'; it would probably look clearer to write include($_SERVER['DOCUMENT_ROOT'] . '/file.php');
There is no difference. These are ‘language constructs’. Syntactically this means that they can be used with or without braces. An example is
echostatement.echo("hello");andecho "hello";are the same