Re: [PHP-DEV] optionally return class name from gettype

2016-07-30 Thread Rasmus Schultz
I agree, an argument that essentially turns it into a different function is not a good practice. Suggestions for a function-name? typeof() or vartype() maybe? On Fri, Jul 29, 2016 at 8:17 PM, Niklas Keller wrote: > > > > Niklas Keller wrote: > > > I'm not sure on the boolean through, I think

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Rasmus Schultz
> the problem IS NOT that we don't have a solution > The problem IS that developer > must call these functions everywhere manually. What you don't seem to get, is your proposal doesn't change that fact? It changes the syntax and means by which you select and call the function, but it still re

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Michael Vostrikov
> This new tag will not simply replace because you still need to output HTML sometimes. This can be done with e.g. "". > What you've coined "context" is really just a pseudo function-call - it does not automatically establish context Yes. Because the language cannot know the task, it cannot kn

[PHP-DEV] [RFC][VOTE] New operator for context-dependent escaping

2016-07-30 Thread Michael Vostrikov
Hello. The RFC 'New operator (tag) for context-dependent escaping' is now in voting phase. https://wiki.php.net/rfc/escaping_operator This RFC introduces new short tag/operator, which will perform echo with an automatic call of escaping function. Voting is open till August 6, but it can be prolon

[PHP-DEV] [RFC][VOTE] New operator (short tag) for context-dependent escaping

2016-07-30 Thread Michael Vostrikov
Hello. The RFC 'New operator (short tag) for context-dependent escaping' is now in voting phase. https://wiki.php.net/rfc/escaping_operator This RFC introduces new short tag/operator, which will perform echo with an automatic call of escaping function. Voting is open till August 6, but it can be

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Thomas Bley
> This can be done with e.g. "". sometimes you also need to sanitize html, e.g. see http://htmlpurifier.org/ Regards Thomas Michael Vostrikov wrote on 30.07.2016 16:01: >> This new tag will not simply replace because you still need > to output HTML sometimes. > > This can be done with e.g.

Re: [PHP-DEV] [RFC][VOTE] New operator (short tag) for context-dependent escaping

2016-07-30 Thread Davey Shafik
This should definitely be a 2 week vote. - Davey On Sat, Jul 30, 2016 at 08:09 Michael Vostrikov wrote: > Hello. The RFC 'New operator (short tag) for context-dependent escaping' is > now in voting phase. > > https://wiki.php.net/rfc/escaping_operator > > This RFC introduces new short tag/operat

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Marco Pivetta
On Sat, Jul 30, 2016 at 8:06 AM, Michael Vostrikov < michael.vostri...@gmail.com> wrote: > No! You don't understand what I'm trying to explain. We understand, that's why we're discussing so much against it. > This feature will be > useful for ALL applications without template engine - framewor

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Michael Vostrikov
> > What you propose is `Foo::escape()` (static), as a language construct. > I have changed the RFC, I wrote about it. Please read the description. There is no more static calls, there is no hacks with not fully qualified name. If any templating engine does that, I'd suggest opening an issue on t

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Reinis Rozitis
From: Michael Vostrikov The problem is that these functions should be called everywhere manually, and there is no error when these functions are not called. And this RFC proposes a solution - call a function automatically. Though you can use pecl/taint for that. If anything imo it would make mo

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Michael Vostrikov
2016-07-31 1:49 GMT+05:00 Reinis Rozitis : > From: Michael Vostrikov >> >> The problem is that these functions should be called everywhere manually, >> and there is no error when these functions are not called. >> And this RFC proposes a solution - call a function automatically. >> > > Though you