代码示例:(标识:demo_php_function1)
<!DOCTYPE html>
<html>
<body>

<?php
function sayhi() {
   echo "Hello world!";
}

sayhi();
?>

</body>
</html>
运行结果: