I have always used readline
in my console commands before, but today I've come across the fread
and fgets
functions and my question is: what is the difference in using these two approaches:
// first
$inputLine = readline();
// second
$inputLine = fgets(STDIN);
they both do pretty much the same, do they not?