RFC: Add `println(string $data = ''): int`

From: Date: Sat, 13 Mar 2021 19:54:04 +0000
Subject: RFC: Add `println(string $data = ''): int`
Groups: php.internals 
Request: Send a blank email to internals+get-113504@lists.php.net to get a copy of this message
Hi internals,

I've created a new RFC https://wiki.php.net/rfc/println 
This proposes adding a global function to PHP to
print a string followed by a unix newline (\n).

Printing a string followed by a newline to stdout is a commonly performed operation in many
applications and programming languages.
Many programming languages provide a helper function to do this specifically, for readability and
convenience.
The choice of end of line string may differ, but many recent programming languages will
unconditionally use the unix newline,
to avoid unexpected differences in behavior between platforms.

I've looked over prior related discussions such as https://externals.io/message/104545,
and I've written down the reasons for my name choice and newline choice in the RFC.

Any other feedback or elaboration on discussions?

Thanks,
- Tyson


Thread (10 messages)

« previous php.internals (#113504) next »