nc_raw() will reset ncurses_halfdelay():
<?php
//This don't set the halfdelay mode
ncurses_halfdelay(9);
ncurses_raw();
?>
If you want set halfdelay and raw be shure put halfdelay after
raw:
<?php
//Correct sets the halfdelay mode
ncurses_raw();
ncurses_halfdelay(9);
?>