外部スクリプトを含めるこれら 2 つの異なる方法で、パフォーマンスに違いはありますか?
変数を使用しない場合:
include $_SERVER['DOCUMENT_ROOT'].'/class/conf.php';
include $_SERVER['DOCUMENT_ROOT'].'/class/Db.php';
include $_SERVER['DOCUMENT_ROOT'].'/class/Posts.php';
変数の使用:
$path = $_SERVER['DOCUMENT_ROOT'];
include $path.'/class/conf.php';
include $path.'/class/Db.php';
include $path.'/class/Posts.php';
メモリの目的でできる限り変数を避けていますが、これがパフォーマンスの良い方法であるかどうかはわかりません。