Note that this function is looking for the ordinal value of a character - you must pass integers, not actual characters.
For the sake of 'ease of use', I use this in my ncurses Window class:
<?php
public function border($left = '|', $top = '-', $right = '|', $bottom = '-', $tlCorner = '+', $trCorner = '+', $brCorner = '+', $blCorner = '+')
{
ncurses_wborder($this->window, ord($left), ord($right), ord($top), ord($bottom), ord($tlCorner), ord($trCorner), ord($blCorner), ord($brCorner));
}
?>
This allows you to do something like the following:
<?php
$window->border('.', '~', 'l', '$');
?>