Re: [PHP-DEV] print with newline

2019-03-02 Thread Joe Watkins
Sara, where do I send pull requests? wrote: > I've always wondered why PHP didn't have a built in command or function > that behaved as `echo` but with a EOL. > I propose not to modify `print` or `echo` (as this was rightly pointed out > to cause b/c). How difficult would it be to add a new stat

Re: [PHP-DEV] print with newline

2019-03-02 Thread Ryan Jentzsch
I've always wondered why PHP didn't have a built in command or function that behaved as `echo` but with a EOL. I propose not to modify `print` or `echo` (as this was rightly pointed out to cause b/c). How difficult would it be to add a new statement and/or function to the PHP core called `say` / `s

Re: [PHP-DEV] print with newline

2019-03-02 Thread Steven Penny
On Sun, 03 Mar 2019 04:47:10, Legale Legage wrote: You trеw the bait with no luck. If you didn't get the hint. Your request have extremely low probability of acceptance. Try something else. how about you dont tell me what to try, and i dont tell you how to spell "took". deal? -- PHP Internal

Re: [PHP-DEV] print with newline

2019-03-02 Thread Legale Legage
You trеw the bait with no luck. If you didn't get the hint. Your request have extremely low probability of acceptance. Try something else. On Sun, Mar 3, 2019, 05:26 Steven Penny wrote: > On Sun, 03 Mar 2019 03:36:50, Sara Golemon wrote: > > function println(string $x): void { > > echo $x, PHP_E

Re: [PHP-DEV] print with newline

2019-03-02 Thread Steven Penny
On Sun, 03 Mar 2019 03:36:50, Sara Golemon wrote: function println(string $x): void { echo $x, PHP_EOL; } I hereby grant a public domain license to the above code and wish you godspeed bundling it into a composer package to be enjoyed by users of every active version of PHP. my request was not

Re: [PHP-DEV] print with newline

2019-03-02 Thread Sara Golemon
On Sat, Mar 2, 2019 at 1:59 PM Steven Penny wrote: > with PHP, several methods are available to produce output: > [[::snip::]]

Re: [PHP-DEV] print with newline

2019-03-02 Thread Steven Penny
On Sat, 02 Mar 2019 22:15:49, johannes schlueters wrote: PHP's echo has the option already: echo $foo, PHP_EOL; not much difference i effort to writing print $foo, true; except that the code is explicit. my request was not "how to print a newline with PHP". the request is for PHP to impleme

Re: [PHP-DEV] print with newline

2019-03-02 Thread Johannes Schlüter
On Sa, 2019-03-02 at 11:59 -0800, Steven Penny wrote: > 1. Modify one or more of "print", "print_r", "var_export" such that > they produce >    a newline by default This is a break of backwards compatibility in a bad way. This breaks people doing specific output. > 2. Modify one or more of "prin

[PHP-DEV] print with newline

2019-03-02 Thread Steven Penny
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 requ

Re: [PHP-DEV] [RFC] Consistent type errors for internal functions

2019-03-02 Thread Rowan Collins
On 1 March 2019 12:02:29 GMT+00:00, Christian Schneider wrote: >I have an example where this might be harder than necessary: >I'm importing data from an external source. Now in the real-world the >import data files can once in a blue moon contain bogus data, e.g. >there could be an array instead