Re: [PHP-DEV][RFC][VOTING] Context Sensitive Lexer

2015-03-08 Thread Marcio Almada
Hi, Just passing by to announce I already have a working version of the new patch: https://github.com/php/php-src/pull/1158 The patch is 100% compatible with the proposed one with the advantages: - Has no regression or forward compatibility risks and is highly predictable - Has an very

Re: [PHP-DEV] [RFC][DISCUSSION] Constructor behaviour of internal classes

2015-03-08 Thread Yasuo Ohgaki
Hi Stas, On Mon, Mar 2, 2015 at 7:05 AM, Stanislav Malyshev wrote: > Hi! > > > This email is to announce the formal opening of discussion for an RFC > > to clean up the behaviour of the constructors shown by several > > internal classes. > > > > https://wiki.php.net/rfc/internal_constructor_beha

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread reeze
On 9 March 2015 at 06:44, Pierre Joye wrote: > On Sun, Mar 8, 2015 at 2:51 AM, reeze wrote: > > Hi internals, > > > > I'd like to deprecate function: sizeof() [1][2], which is an alias of > > count(). some people > > expect it return the memory size of the variable. > > > > The doc page's[1] use

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread reeze
On 8 March 2015 at 09:39, Yasuo Ohgaki wrote: > Hi all, > > On Sun, Mar 8, 2015 at 5:41 AM, Stanislav Malyshev > wrote: > >> > I'd like to deprecate function: sizeof() [1][2], which is an alias of >> > count(). some people >> > expect it return the memory size of the variable. >> >> Why? So, som

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread reeze
Hi, On 8 March 2015 at 00:41, Kalle Sommer Nielsen wrote: > Hi > > 2015-03-07 16:51 GMT+01:00 reeze : > > Hi internals, > > > > I'd like to deprecate function: sizeof() [1][2], which is an alias of > > count(). some people > > expect it return the memory size of the variable. > > > > The doc pag

Re: [PHP-DEV] [RFC] Anonymous Classes

2015-03-08 Thread Thomas Bley
Just a question, can I do: $c = class { public static function square($i) { return $i*$i; } }); echo $c::square(42); or $c = class extends DateTime { public static function createFromFormat($translateFormat, $time) { $translateFormat = str_replace('foo', 'Y-m-d', $translateFormat)

Re: [PHP-DEV] [RFC] Anonymous Classes

2015-03-08 Thread Philip Sturgeon
Patrick, On Sat, Mar 7, 2015 at 2:22 AM, Patrick Schaaf wrote: > > Am 06.03.2015 20:14 schrieb "Philip Sturgeon" : >> >> Right, this here RFC has been drastically improved. >> >> https://wiki.php.net/rfc/anonymous_classes >> >> Anyone got any doubts or troubles at this point? > > Can we / could w

Re: [PHP-DEV] [RFC] Anonymous Classes

2015-03-08 Thread Philip Sturgeon
Stanislav, On Fri, Mar 6, 2015 at 6:42 PM, Stanislav Malyshev wrote: > Hi! > Couple of points to clarify: > > 1. Is the new syntax "new class ..." or just "class ..." and new works > the same? I.e. could you do: > > $foo = class extends Callback { ... } > $bar = new $foo; Nope, none of that. Wra

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread Pierre Joye
On Sun, Mar 8, 2015 at 2:51 AM, reeze wrote: > Hi internals, > > I'd like to deprecate function: sizeof() [1][2], which is an alias of > count(). some people > expect it return the memory size of the variable. > > The doc page's[1] user contributed notes indicate that too. > > What do you think?

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Rowan Collins
On 08/03/2015 01:15, Yasuo Ohgaki wrote: On Sun, Mar 8, 2015 at 3:39 AM, Rowan Collins > wrote: To an extent, yes. Part of the point that I and others are making is that this is not a simple change to make. Whatever we do to try and "fix" the current

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 19:05, Rowan Collins a écrit : On 08/03/2015 15:45, Grégory Planchat wrote: class BarSortable implements Sorter { public function sort(Sortable $collection) { $previousKey = null; $previousElement = null; foreach ($collection as $key => $element) {

[PHP-DEV] Re: [VOTE] Exceptions in the engine

2015-03-08 Thread Nikita Popov
On Mon, Feb 23, 2015 at 7:15 PM, Nikita Popov wrote: > Hi internals! > > Voting on the engine exceptions RFC, which proposes to convert existing > fatal and recoverable fatal errors into exceptions, has opened: > > https://wiki.php.net/rfc/engine_exceptions_for_php7#vote > > The primary vote

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Rowan Collins
On 08/03/2015 15:45, Grégory Planchat wrote: class BarSortable implements Sorter { public function sort(Sortable $collection) { $previousKey = null; $previousElement = null; foreach ($collection as $key => $element) { if ($previousKey === null) {

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 16:53, Lester Caine a écrit : "Lorem ipsum dolor sit amet"->length(); "Lorem ipsum dolor sit amet"->search('lorem'); "Lorem ipsum dolor sit amet"->replace('lorem', 'Lorem'); This is actually the problem that trying to ignore unicode then creates a black hole. The amount of space n

Re: [PHP-DEV] Re: Feature request and RFC

2015-03-08 Thread Lester Caine
On 08/03/15 14:03, Rowan Collins wrote: > On 04/03/2015 10:07, Lester Caine wrote: >> On 04/03/15 09:41, Rowan Collins wrote: >>> Hm, yes, I hadn't thought of the use case of sorting external data. >>> Perhaps we actually need to specify both interfaces (yes, I realise >>> I'm just inventing more w

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Lester Caine
On 08/03/15 13:53, Grégory Planchat wrote: >> On 08/03/15 10:03, Grégory Planchat wrote: >>> Then using multiple encodings in a same script or using a same script >>> for multiple encodings becomes straightforward and standard. Most PHP >>> developers doesn't even know what is Unicode or a characte

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 15:19, Rowan Collins a écrit : On 08/03/2015 10:51, Grégory Planchat wrote: Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feat

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Rowan Collins
On 08/03/2015 10:51, Grégory Planchat wrote: Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https:

Re: [PHP-DEV] Re: Feature request and RFC

2015-03-08 Thread Rowan Collins
On 04/03/2015 10:07, Lester Caine wrote: On 04/03/15 09:41, Rowan Collins wrote: Hm, yes, I hadn't thought of the use case of sorting external data. Perhaps we actually need to specify both interfaces (yes, I realise I'm just inventing more work here, sorry!) - one for the use case of a custom

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-08 Thread Rowan Collins
On 08/03/2015 01:25, Yasuo Ohgaki wrote: Hi Rowan, On Sun, Mar 8, 2015 at 8:31 AM, Rowan Collins > wrote: What? That's not the same thing at all. I'm pretty sure those functions are deprecated *because* we have array callback forms, so you can use ca

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 12:17, Lester Caine a écrit : On 08/03/15 10:03, Grégory Planchat wrote: Then using multiple encodings in a same script or using a same script for multiple encodings becomes straightforward and standard. Most PHP developers doesn't even know what is Unicode or a character encoding,

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Lester Caine
On 08/03/15 10:03, Grégory Planchat wrote: > Then using multiple encodings in a same script or using a same script > for multiple encodings becomes straightforward and standard. Most PHP > developers doesn't even know what is Unicode or a character encoding, > they just see "odd characters that are

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possibl

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Grégory Planchat
Hi Yasuo, Le 08/03/2015 00:44, Yasuo Ohgaki a écrit : Hi Gregory, On Sun, Mar 8, 2015 at 2:12 AM, Grégory Planchat wrote: Le 07/03/2015 02:39, Yasuo Ohgaki a écrit : We may provide new names and new parameter order in new namespace. The difference is "alias" or "namespace" basically. I don

Re: [PHP-DEV] Consistent function names

2015-03-08 Thread Lester Caine
On 08/03/15 01:15, Yasuo Ohgaki wrote: > Let's agree to disagree. Otherwise, discussion will be circular. > > I would like to keep/maintain legacy procedural functions forever. > You would like to replace/remove legacy procedural functions by OO like API > if it's possible. Discussions like this

Re: [PHP-DEV] Re: Feature request and RFC

2015-03-08 Thread Lester Caine
On 08/03/15 08:57, Thomas Gielfeldt wrote: >> > > What about a "hybrid" solution? Pass the flags as well as a callback. Then > the implementor can react on the flags if necessary. > > https://gist.github.com/gielfeldt/c0ca611f525878c36a65 Off topic I know - but how the do I make the github t

Re: [PHP-DEV] Re: Feature request and RFC

2015-03-08 Thread Thomas Gielfeldt
2015-03-04 10:41 GMT+01:00 Rowan Collins : > On 4 March 2015 07:12:41 GMT, Thomas Gielfeldt > wrote: > >2015-03-02 16:26 GMT+01:00 Rowan Collins : > > > >> Rowan Collins wrote on 02/03/2015 10:52: > >> > >>> Thomas Gielfeldt wrote on 02/03/2015 07:43: > >>> > >>> 2015-02-24 17:17 GMT+01:00 Thoma