Use of undefined constant STDIN – assumed ‘STDIN’

<?php
echo "Hello there. So I hear you're learning to be a PHP programmer!n";
echo "Why don't you type in your name for me:n";
$name = trim(fgets(STDIN));
echo "nThanks, " . $name . ", it's really nice to meet you.nn";
?>

a am using php version 5.5.19
xampp


Source: php

Leave a Reply