(PHP 4 >= 4.0.7, PHP 5 < 5.3.0, PECL ncurses >= 1.0.0)
ncurses_beep — Let the terminal beep
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。
ncurses_beep() sends an audible alert (bell) and if its not possible flashes the screen.
Anonymous (2009-08-03 07:46:50)
Another way to beep (e.g. on Ubuntu) is to install "beep" from repository and use:
<?php
exec("beep");
?>
arplynn at gmail dot com (2006-01-21 12:17:17)
If you want to make the terminal beep on a PHP CLI application without needing the ncurses library, use the following code:
<?php
function cli_beep()
{
echo "\x07";
}
?>