The php man page for cli has a comment here that details the solution (copied here for someone else)
<?php echo "Are you sure you want to do this? Type 'yes' to continue: "; $handle = fopen ("php://stdin","r"); $line = fgets($handle); if(trim($line) != 'yes'){ echo "ABORTING!\n"; exit; } fclose($handle); echo "\n"; echo "Thank you, continuing...\n"; ?>
Crisp Mar 10 '13 at 12:54 on 2013-03-10 12:54
source share