單行評論

單行註釋以“//”或“#”開頭。遇到時,PHP 直譯器將忽略右側的所有文字。

// This is a comment

# This is also a comment

echo "Hello World!"; // This is also a comment, beginning where we see "//"