Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Daniel Beardsley
> Wouldn't this __auto_escape setting effectively break libraries that depend > on it being on or off? The settings was meant to be turned on *only* during template rendering. So, yes, if outside code is run during your template rendering that also uses templating, but is unaware of auto escaping,

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Daniel Beardsley
> Issue is "Escaping is done on a specific context". > > I understand your proposal is focused on HTML escaping. However, > setting names like > __auto_escape_exempt_class > is not good choice. It has to be > __auto_html_escape_exempt_class > at least because it is for HTML escaping. Yes, the ini

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Daniel Beardsley
> I agree XHP really is the right solution for this problem. It enables HTML > to be created structurally and composably with a concise inline syntax, just > like JSX/React does for JavaScript, and just like LINQ does for SQL in C#. > It's much better than passing around snippets of HTML as strings

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Pierre Joye
On Mar 21, 2016 12:53 PM, "Daniel Beardsley" wrote: > > > > T_ECHO (echo, > > ZEND_AST_ECHO_ESCAPE node in the syntax tree. > > > > > Interesting approach, I assume an explicit `echo $foo;` takes the > > normal ZEND_ECHO route then? > > No, looking at the code and tests: echo, print, and parsing

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Jesse Schalken
Wouldn't this __auto_escape setting effectively break libraries that depend on it being on or off? People often write code to generate HTML like this: ob_start(); ?> some HTML more HTML wrote: > Hi Daniel, > > On Mon, Mar 21, 2016 at 7:11 AM, Daniel Beardsley > wrote: > > I'd like to su

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Daniel Beardsley
> > T_ECHO (echo, > ZEND_AST_ECHO_ESCAPE node in the syntax tree. > > > Interesting approach, I assume an explicit `echo $foo;` takes the > normal ZEND_ECHO route then? No, looking at the code and tests: echo, print, and > Which allows instances of `HtmlString` to pass straight through a > > tem

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Yasuo Ohgaki
Hi Daniel, On Mon, Mar 21, 2016 at 7:11 AM, Daniel Beardsley wrote: > I'd like to submit an RFC (with a pull request) for adding auto-escaping to > the php language. > > We at iFixit.com have used PHP for nearly a decade to run our website. > Several years ago, we abandoned the Smarty templating

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Jesse Schalken
I agree XHP really is the right solution for this problem. It enables HTML to be created structurally and composably with a concise inline syntax, just like JSX/React does for JavaScript, and just like LINQ does for SQL in C#. It's* much* better than passing around snippets of HTML as strings that

Re: [PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Sara Golemon
On Sun, Mar 20, 2016 at 3:11 PM, Daniel Beardsley wrote: > I'd like to submit an RFC (with a pull request) for adding auto-escaping to > the php language. > > T_ECHO (echo, ZEND_AST_ECHO_ESCAPE node in the syntax tree. > Interesting approach, I assume an explicit `echo $foo;` takes the normal ZEN

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-20 Thread David Zuelke
> On 20.03.2016, at 22:41, Anatol Belski wrote: > > Hi, > >> -Original Message- >> From: David Zuelke [mailto:d...@heroku.com] >> Sent: Sunday, March 20, 2016 10:10 PM >> To: Anatol Belski >> Cc: Christoph Becker ; Pierre Joye >> ; PHP internals >> Subject: Re: [PHP-DEV] PCRE JIT stac

[PHP-DEV] RFC about automatic template escaping

2016-03-20 Thread Daniel Beardsley
I'd like to submit an RFC (with a pull request) for adding auto-escaping to the php language. We at iFixit.com have used PHP for nearly a decade to run our website. Several years ago, we abandoned the Smarty templating engine and used php files directly as templates. This worked, but was a bit uns

Re: [PHP-DEV] Huge Pages

2016-03-20 Thread Rasmus Lerdorf
On 03/20/2016 01:58 PM, Anatol Belski wrote: > Dmitry has already merged this patch into the 7.0 branch. I also know from > Remi that Fedora doesn't play well with the huge pages. Huge pages require > special system settings which are usually not enabled in OSes by default. > Having it off by de

Re: [PHP-DEV] OpenSSL ext status including port to OpenSSL 1.1

2016-03-20 Thread Niklas Keller
> > > I have got a port of the extension to work on OpenSSL 1.1. There has been > > quite a bit of changes mainly due to the fact that most structures are > now > > opaque (but also some other changes) > > I assume 1.0.whatever-is-in-ubuntu will remain usable? Or do we plan on > requiring 1.1 in, s

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-20 Thread Anatol Belski
Hi, > -Original Message- > From: David Zuelke [mailto:d...@heroku.com] > Sent: Sunday, March 20, 2016 10:10 PM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > > On 17.03.2016, at 05:22, David Zuelke wrote

Re: [PHP-DEV] Enabling opcache causes libraries to build as static

2016-03-20 Thread David Zuelke
On 10.03.2016, at 16:56, David Zuelke wrote: > >> On 08.03.2016, at 16:18, Andrea Faulds wrote: >> >> Hi, >> >> David Zuelke wrote: >>> Is this intentional? Related to opcache's "can only be built shared" >>> status? But why would that trigger static builds? Or is it a bug? >> >> While we're

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-20 Thread David Zuelke
> On 17.03.2016, at 05:22, David Zuelke wrote: > >> On 16.03.2016, at 21:38, Anatol Belski wrote: >> >> Hi, >> >>> -Original Message- >>> From: David Zuelke [mailto:d...@heroku.com] >>> Sent: Tuesday, March 15, 2016 11:58 PM >>> To: Anatol Belski >>> Cc: Christoph Becker ; Pierre Joye

Re: [PHP-DEV] OpenSSL ext status including port to OpenSSL 1.1

2016-03-20 Thread David Zuelke
On 20.03.2016, at 20:50, Jakub Zelenka wrote: > > Hi, > > I just wanted to send a quick update about my recent work on openssl ext in > case someone else wanted to start something similar so we don't have a > wasted effort on that. :) > > 1. Error queueing > > I'm more or less done with a patc

RE: [PHP-DEV] Huge Pages

2016-03-20 Thread Anatol Belski
Hi Rasmus, > -Original Message- > From: Rasmus [mailto:ras...@lerdorf.com] > Sent: Sunday, March 20, 2016 5:29 AM > To: php-internals > Subject: [PHP-DEV] Huge Pages > > We have a bit of a problem with how Linux handles huge pages when you run > out of them. > > I've been discussing it

[PHP-DEV] OpenSSL ext status including port to OpenSSL 1.1

2016-03-20 Thread Jakub Zelenka
Hi, I just wanted to send a quick update about my recent work on openssl ext in case someone else wanted to start something similar so we don't have a wasted effort on that. :) 1. Error queueing I'm more or less done with a patch for error storing and clearing OpenSSL error queue: https://githu

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-20 Thread Johannes Schlüter
On Wed, 2016-03-16 at 12:36 -0400, Phil Sturgeon wrote: > Hello everyone, > > I have completed the draft for an RFC, to add Typed Properties. The > patch has been written by the one and only Joe Watkins. > > https://wiki.php.net/rfc/typed-properties I'm no fan of all this typing business, but th

Re: [PHP-DEV] [RFC] Libsodium (bump)

2016-03-20 Thread Scott Arciszewski
On Sat, Mar 19, 2016 at 4:30 AM, Fleshgrinder wrote: > On 3/18/2016 9:56 PM, Levi Morrison wrote: > >> At least that's not what it says in the docs. > > > > I meant: at least according to the docs: > > http://php.net/manual/en/language.namespaces.rationale.php > > > >> Namespace names PHP and ph

Re: [PHP-DEV] Object getter method optimization

2016-03-20 Thread Dmitry Stogov
Hi Yo-An Lin, Unfortunately, this approach won't work. At first, at compile time we don't know the body of called getter. At second, the called method might be changed even at run-time, because of polymorphism. Tricks like this might be implemented using JIT and polymorphic inline caches. Thank

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-20 Thread Fleshgrinder
On 3/20/2016 2:19 PM, Fleshgrinder wrote: > On 3/19/2016 9:32 PM, Andrea Faulds wrote: >> This adds a loophole to property type checks which, as previously >> mentioned, prevents us from performing optimisations. I also don't see >> why internal functions should be treated specially here, given tha

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-20 Thread Phil Sturgeon
On Wed, Mar 16, 2016 at 1:08 PM, Adam Harvey wrote: > On 16 March 2016 at 09:36, Phil Sturgeon wrote: >> 3. Weak vs Strict. Right now this is entirely strict, with no >> declare() to change mode. Reasons for this vary, from various sources, >> but include "Not sure how to implement it" and "Well

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-20 Thread Fleshgrinder
On 3/19/2016 9:32 PM, Andrea Faulds wrote: > Hi, > > Fleshgrinder wrote: >> I see a big problem with the erroring no matter when as others already >> pointed out, e.g. together with named constructors (or factory methods >> if you prefer that name) but also with lazy loading. I think that the >> n

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-20 Thread Bob Weinand
> Am 16.03.2016 um 18:27 schrieb Chris Riley : > On 16 March 2016 at 17:17, Bob Weinand > wrote: > > Am 16.03.2016 um 17:36 schrieb Phil Sturgeon > >: > > 2. This whole temporary nullability situation, where unset properties > > will error

[PHP-DEV] Re: [RFC Discussion] Typed Properties

2016-03-20 Thread Andrea Faulds
Hi Phil, Phil Sturgeon wrote: 1. How scared are we that integers can be expanded to floats on runtime? This is a vaguely-worded question, and I'm concerned not everyone reading it might have the same interpretation. If by "expanded" we mean that you can assign to an int value to a float ty

Re: [PHP-DEV] Object getter method optimization

2016-03-20 Thread Nikita Nefedov
On Sat, 19 Mar 2016 23:40:09 +0300, Andrea Faulds wrote: Hi Lin, Lin Yo-An wrote: Since the original approach doesn't work, here comes another new idea: When executing method call on an object, if we found the method body are just 2 op codes (FETCH_OBJ_R and RETURN), we then denote the metho