3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=" "; echo "enter the number of rows"; $b=fgets(STDIN); $num=1; for($a=1;$a>$b;$a++) { echo "$a"; exit(0); }
based on qmKHc
Output for 5.2.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
enter the number of rows1
Output for 4.3.0 - 5.2.2
enter the number of rows Notice: Use of undefined constant STDIN - assumed 'STDIN' in /in/sL1Jp on line 4 Warning: fgets(): supplied argument is not a valid stream resource in /in/sL1Jp on line 4 1