3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "enter your name:\n"; $f=fgets(STDIN); echo "$f"; ?>
Output for 5.2.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
enter your name:
Output for 4.3.0 - 5.2.2
enter your name: Notice: Use of undefined constant STDIN - assumed 'STDIN' in /in/1A81L on line 3 Warning: fgets(): supplied argument is not a valid stream resource in /in/1A81L on line 3