$content = file_get_contents('large_file.txt');// ❌ 差
for ($i=0; $i<10000; $i++) { $obj = new HeavyClass(); }
// ✅ 好
$obj = new HeavyClass();
for ($i=0; $i<10000; $i++) { $obj->reset(); }$a = 'hello $world'; // 字面值 $b = "hello $world"; // 需解析變數
class Config {
const API_URL = 'https://api.example.com'; // 優於 define()
}