with PHP, several methods are available to produce output:
echo "hello world\n";
print "hello world\n";
print_r("hello world\n");
var_export("hello world\n");
However all these methods have something in common: they do not produce their
own newline. With each method, the user is required to provide a newline with
"\n", PHP_EOL or similar. This is bothersome because many other programming
languages offer such a method. For example Python:
print('hello world')
Perl:
use feature say;
say 'hello world';
Ruby:
puts 'hello world'
Lua:
print 'hello world'
Even C:
#include <stdio.h>
int main() {
puts("hello world");
}
To resolve, implement "puts" function similar to Ruby or C:
- http://pubs.opengroup.org/onlinepubs/9699919799/functions/puts.html
- http://ruby-doc.org/core/IO.html#method-i-puts