- strtolower: documentation ( source)
<?php
function questionApplicantsAttendance() {
$answer = readline("Do you want to attend our PHP conference? [Y/n]");
return strtolower($answer) == 'y';
}
$applicantWillAttend = questionApplicantsAttendance();
if($applicantWillAttend) {
echo 'You would have fun';
} else {
echo 'You would lose a great opportunity';
}
?>