3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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; } echo "\n"; echo "Thank you, continuing...\n";
Output for 4.3.0 - 7.1.0
Are you sure you want to do this? Type 'yes' to continue: ABORTING!