Re: print with newline
| From: | Joe Watkins | Date: | Sun, 10 Mar 2019 19:57:02 +0000 |
| Subject: | Re: print with newline | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104629@lists.php.net to get a copy of this message | ||
As a function it has parity with fputs ... even though fputs doesn't have
the same behaviour the two can be considered complimentary, and you would
want to be able to cuf(a) puts like fputs.
Regardless an RFC may go ahead without optimized implementation.
Cheers
Joe
On Sun, 10 Mar 2019, 20:28 Thomas Punt, <tpunt@hotmail.co.uk> wrote:
> > From: Steven Penny <svnpenn@gmail.com>
> > Sent: 04 March 2019 15:30
> > To: internals@lists.php.net
> > Subject: Re: [PHP-DEV] print with newline
> >
> > I think the best option is a new function like "puts" or "posix_puts".
>
> I'm fairly neutral on the feature, but I disagree with this being a
> function.
> It should be a language construct for parity with the echo and print.
>
> For what it's worth, I actually wrote an article about exactly this. Whilst
> it was more for didactic reasons (meaning that parts of the implementation
> could/should be changed), you may find it to be a nice read:
>
>
> https://phpinternals.net/articles/implementing_new_language_constructs_via_opcode_extending
>
> Cheers,
> Tom
>