Reading the designated pin value
int uio_in(int $uio_id, int $pin)
Returns 1 when the port state is HIGH, 0 when the port state is LOW
<?php
$in_value = 0;
include "/lib/sd_340.php";
uio_setup(0, 0, "in_pu"); // Setting the pin 0 of the UIO 0 to input with pull-up
echo $in_value = uio_in(0, 0); // Reading and printing the pin 0 of the UIO 0
?>