3v4l.org

run code in 200+ 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 DnrKg
Output for 7.2.0
enter the number of rows Warning: Use of undefined constant a - assumed 'a' (this will throw an Error in a future version of PHP) in /in/qmKHc on line 6 1
Output for 5.2.3 - 7.1.10
enter the number of rows Notice: Use of undefined constant a - assumed 'a' in /in/qmKHc on line 6 1
Output for 4.3.0 - 5.2.2
enter the number of rows Notice: Use of undefined constant STDIN - assumed 'STDIN' in /in/qmKHc on line 4 Warning: fgets(): supplied argument is not a valid stream resource in /in/qmKHc on line 4 Notice: Use of undefined constant a - assumed 'a' in /in/qmKHc on line 6 1