Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-12 Thread Pierre Joye
Hi, Only adding Rob just in case :) best, On Wed, Mar 13, 2019, 5:54 AM Benjamin Eberlei wrote: > Hi everyone, > > While looking for things to work on in php-src my friend Thomas pointed me > to a peculiar special case in ext/dom that leads to massive inconsistency > problems in the API. > > T

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-12 Thread David Zuelke
I agree this should be fixed. It's pretty hilarious how this exact case (fiddling with the xmlns prefix) is the only comment for DOMElement::setAttributeNS: http://php.net/manual/en/domelement.setattributens.php (although unnecessary, as you don't have to "add namespaces" to a document, that automa

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Johannes Schlüter
On Di, 2019-03-12 at 23:50 +0100, Peter Kokot wrote: >  > > Which would be good - as all those things make writing portable > > code > > harder. > > > >    $ echo '' | php > > > > Is a valid program, which will behave vastly different based on the > > ini > > setting. > > In reality if developer

Re: [PHP-DEV] RFC: Locked Classes

2019-03-12 Thread Rowan Collins
On 12/03/2019 21:40, Stanislav Malyshev wrote: Isn't it just: trait Locked { public function __set($name, $value) { throw new RuntimeException("Property $name not declared!"); } public function __get($name) { throw new RuntimeException("Property $name not declared!");

[PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-12 Thread Benjamin Eberlei
Hi everyone, While looking for things to work on in php-src my friend Thomas pointed me to a peculiar special case in ext/dom that leads to massive inconsistency problems in the API. There is an undocumented class DOMNameSpaceNode that gets returned from DOMElement::getAttributeNode(NS) if you se

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Peter Kokot
Hello, On Tue, 12 Mar 2019 at 17:57, Johannes Schlüter wrote: > > On Di, 2019-03-12 at 15:53 +, Rowan Collins wrote: > > On Tue, 12 Mar 2019 at 13:28, G. P. B. > > wrote: > > > > > > > > I was more going along the lines of removing short tags altogether > > > with the > > > ini setting as th

Re: [PHP-DEV] RFC: Locked Classes

2019-03-12 Thread Gabriel O
It was already addressed how using such trivial solution is insufficient, please read whole thread > On 12. Mar 2019, at 22:40, Stanislav Malyshev wrote: > > Hi! > >> While it can be useful, the ability to set an object property which is >> not part of the class definition can also lead to sub

Re: [PHP-DEV] RFC: Locked Classes

2019-03-12 Thread Stanislav Malyshev
Hi! > While it can be useful, the ability to set an object property which is > not part of the class definition can also lead to subtle bugs. Banning > this for all objects would be a significant and painful breaking change, > so I propose instead the option to mark a particular class with a new >

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Johannes Schlüter
On Di, 2019-03-12 at 15:53 +, Rowan Collins wrote: > On Tue, 12 Mar 2019 at 13:28, G. P. B. > wrote: > > > > > I was more going along the lines of removing short tags altogether > > with the > > ini setting as they are not available out of the box except if you > > use a > > special compile

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Stanislav Malyshev
Hi! > I'm currently going through the PHP doc to remove mentions of PHP 4 > and stumbled upon the short_open_tag ini directive [1] which only affects > the availability of ` From my understanding, the ` so maybe we should deprecate PHP's short tag altogether? Why? What would it improve for people

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Chase Peeler
On Tue, Mar 12, 2019 at 10:12 AM Kalle Sommer Nielsen wrote: > Hi > > Den tir. 12. mar. 2019 kl. 15.49 skrev Chase Peeler >: > > Everything looks weird and "non-phpish" when it's new. OO constructs > weren't PHP-ish at first, because PHP didn't originally support OO. Imagine > "foreach" didn't e

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Rowan Collins
On Tue, 12 Mar 2019 at 13:28, G. P. B. wrote: > I was more going along the lines of removing short tags altogether with the > ini setting as they are not available out of the box except if you use a > special compile flag. > I don't really follow this reasoning: if we removed every feature whic

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Levi Morrison
On Sun, Mar 10, 2019 at 3:45 PM Larry Garfield wrote: > > Hello, peoples. I know it's been discussed once or twice before on the list, > many years ago, but not recently. I therefore feel OK putting forth the > following draft proposal for Comprehensions, aka "compact generators", in PHP: > >

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Andrey Hristov
Hi, the real fun starts when people start to put list comprehension in a list comprehension in a list comprehension. And the result is one-liners that are pretty dense and write once never read. The problem during software development are not the key strokes, it's the time which later has to

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Björn Larsson
Den 2019-03-11 kl. 13:16, skrev Nikita Popov: On Sun, Mar 10, 2019 at 10:45 PM Larry Garfield wrote: Hello, peoples. I know it's been discussed once or twice before on the list, many years ago, but not recently. I therefore feel OK putting forth the following draft proposal for Comprehensio

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Sara Golemon
On Sun, Mar 10, 2019 at 4:45 PM Larry Garfield wrote: > Sara Golemon has written a preliminary patch that is partially complete > (see the RFC link for details, it's impressively simple), but unfortunately > doesn't have the bandwidth to complete it at this time. I am therefore > looking for col

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Kalle Sommer Nielsen
Hi Den tir. 12. mar. 2019 kl. 15.49 skrev Chase Peeler : > Everything looks weird and "non-phpish" when it's new. OO constructs weren't > PHP-ish at first, because PHP didn't originally support OO. Imagine "foreach" > didn't exist in PHP and we were still using while(list($key,$value) = > each(

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Chase Peeler
On Tue, Mar 12, 2019 at 4:55 AM Kalle Sommer Nielsen wrote: > Hi > > Den søn. 10. mar. 2019 kl. 23.45 skrev Larry Garfield < > la...@garfieldtech.com>: > > > > Hello, peoples. I know it's been discussed once or twice before on the > list, many years ago, but not recently. I therefore feel OK pu

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread G. P. B.
On Tue, 12 Mar 2019 at 14:43, Christoph M. Becker wrote: > On 12.03.2019 at 14:27, G. P. B. wrote: > > > I was more going along the lines of removing short tags altogether with > the > > ini setting as they are not available out of the box except if you use a > > special compile flag. > > To my k

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Christoph M. Becker
On 12.03.2019 at 14:27, G. P. B. wrote: > I was more going along the lines of removing short tags altogether with the > ini setting as they are not available out of the box except if you use a > special compile flag. To my knowledge, short_open_tag=1 *always* enables short open tags, regardless o

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread G. P. B.
I was more going along the lines of removing short tags altogether with the ini setting as they are not available out of the box except if you use a special compile flag. However, I didn't know they were used with template engines but wouldn't they just use `

Re: [PHP-DEV] Base_convert changes

2019-03-12 Thread Scott Dutton
On 11.03.2019 10:51, Nikita Popov wrote: Both changes sound reasonable to me. Could you show some examples where the output is going to change due to the zend_ulong->zend_long switch? Nikita Sure! For example var_dump(decbin(9223372036854775807)); would currently show string(64) "1

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Peter Kokot
On Tue, 12 Mar 2019 at 12:15, Alexandru Pătrănescu wrote: > > Hi, > > I guess that `short_open_tag` ini settings can be deprecated/removed. > But that would mean that short open tags will be always available, not that > it will be removed. > > Regards, > Alex Oh, the main idea is to remove the in

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Alexandru Pătrănescu
Hi, I guess that `short_open_tag` ini settings can be deprecated/removed. But that would mean that short open tags will be always available, not that it will be removed. Regards, Alex On Tue, Mar 12, 2019 at 12:39 PM Rowan Collins wrote: > On Tue, 12 Mar 2019 at 10:12, Peter Kokot wrote: > >

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Rowan Collins
On Tue, 12 Mar 2019 at 10:12, Peter Kokot wrote: > > PHP based template engines today most likely use only because of this topic today exactly. Possibility of being deprecated > :) I think the short opening tags are good to go so things are more > simple. > A quick search of the list archives

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Peter Kokot
Hello, On Tue, 12 Mar 2019 at 10:51, Rowan Collins wrote: > > On Mon, 11 Mar 2019 at 20:06, G. P. B. wrote: > > > From my understanding, the ` > so maybe we should deprecate PHP's short tag altogether? > > > > > I think when that's been proposed in the past, people have said they like > it for us

Re: [PHP-DEV] Deprecate short_open_tag ini directive?

2019-03-12 Thread Rowan Collins
On Mon, 11 Mar 2019 at 20:06, G. P. B. wrote: > From my understanding, the ` so maybe we should deprecate PHP's short tag altogether? > I think when that's been proposed in the past, people have said they like it for use in simple templates, often along with the "alternative control structures"

Re: [PHP-DEV] RFC Draft: Comprehensions

2019-03-12 Thread Kalle Sommer Nielsen
Hi Den søn. 10. mar. 2019 kl. 23.45 skrev Larry Garfield : > > Hello, peoples. I know it's been discussed once or twice before on the list, > many years ago, but not recently. I therefore feel OK putting forth the > following draft proposal for Comprehensions, aka "compact generators", in PHP: