Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread Andrei Zmievski
On Fri, Jun 3, 2011 at 3:11 PM, David Zülke wrote: > It's not FUD. > > It is different from writing json_decode('ä\u0123'), because json_decode() in > PHP only accepts UTF-8 encoded input; > > Give it a shot: > > $chr = "\xC3\xA4"; // "ä" as UTF-8 > var_dump(json_decode('["' . $chr . '\u00e4"]')

Re: [PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Stas Malyshev
Hi! That is subjective. And even with a threaded client, if there are 80+ new messages then the call for vote is drowned out. *Requiring* There was never 80+ new messages on different topics on the list. There are 3-4 topics max, if you not count commit messages. Each of them can contain doz

[PHP-DEV] JSON array/object syntax

2011-06-03 Thread dukeofgaming
Hi, After reading all the debate in the other thread it is still not clear to me what the real advantages are of adopting JSON syntax for native PHP types. Doing json_encode to an object and expect the code and output to be the same seems useless to me, and reading David Zülke's example it seems m

RE: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread John Crenshaw
This is a moot point. You wouldn't send that to json_decode. You would send it to json_encode. In other words json_decode({"yay": "ä"}) is totally wrong in the first place, because json_decode requires a string, not an object. John Crenshaw Priacta, Inc. -Original Message- From: David Z

Re: [PHP-DEV] DOMNode::getAttribute()

2011-06-03 Thread David Zülke
On 03.06.2011, at 22:38, Matt Pelmear wrote: > Hello, > > I discovered today that the DOMNode::getAttribute() function (which is > undocumented on the php site) It's DOMElement::getAttribute()... > returns an empty string if the requested > attribute doesn't exist in the node. Yes, but that's

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread David Zülke
It's not FUD. It is different from writing json_decode('ä\u0123'), because json_decode() in PHP only accepts UTF-8 encoded input; Give it a shot: That'll produce: > array(1) { > [0]=> > string(4) "ää" > } > NULL Understand what the problem is now? If someone does this in a latin1-encod

Re: [PHP-DEV] DOMNode::getAttribute()

2011-06-03 Thread Scott MacVicar
On Jun 3, 2011, at 1:38 PM, Matt Pelmear wrote: > Hello, > > I discovered today that the DOMNode::getAttribute() function (which is > undocumented on the php site) returns an empty string if the requested > attribute doesn't exist in the node. > > From the source: > if (value == NULL) { >

Re: [PHP-DEV] DOMNode::getAttribute()

2011-06-03 Thread Philip Olson
> Does anyone know of a particular reason it is not documented? > (I'd be happy to document and provide the ridiculously simple patch of > returning NULL...) Greetings Matt, Documenting DOM is messy/tricky (and underdocumented), but: - http://php.net/domelement.getattribute Here's one option

[PHP-DEV] DOMNode::getAttribute()

2011-06-03 Thread Matt Pelmear
Hello, I discovered today that the DOMNode::getAttribute() function (which is undocumented on the php site) returns an empty string if the requested attribute doesn't exist in the node. >From the source: if (value == NULL) { RETURN_EMPTY_STRING(); } else {

RE: [PHP-DEV] RFC: Enum

2011-06-03 Thread John Crenshaw
1. Yeah, let me explain: A lot of times (at least in the patterns that lead to enum usage in C++) you need to be able to know what is in the enum, for example, to iterate a list that will have exactly the same number of entries as the enum or something. In other words, the enum represent

Re: [PHP-DEV] RFC: Enum

2011-06-03 Thread Dennis Haarbrink
2011/6/3 John Crenshaw > As much as I used enums in C++, I'm not sure that this is really the right > tool here, and it often introduces more problems than it solves. Specific > concerns that come to mind: > > 1. In C++ this often led to nasty needs such as a "LOG_LEVEL_COUNT" entry > at the end

Re: [PHP-DEV] RFC: Enum

2011-06-03 Thread Dennis Haarbrink
2011/6/3 Marcel Esser > On 6/3/2011 8:27 AM, Dennis Haarbrink wrote: > >> As soon as I have my requested write permission in the rfc namespace i >> will >> update it. >> >> -- >> Dennis Haarbrink >> >> >> 2011/6/3 Pierrick Charron >> >> Hi, >>> >>> The RFC was supposed to be a draft (i didn't re

RE: [PHP-DEV] RFC: Enum

2011-06-03 Thread John Crenshaw
As much as I used enums in C++, I'm not sure that this is really the right tool here, and it often introduces more problems than it solves. Specific concerns that come to mind: 1. In C++ this often led to nasty needs such as a "LOG_LEVEL_COUNT" entry at the end of the list of enums. 2. Sometime

Re: [PHP-DEV] RFC: Zend Signal Handling

2011-06-03 Thread Ilia Alshanetsky
The crash is now fixed as well. On Fri, Jun 3, 2011 at 2:41 AM, Felipe Pena wrote: > 2011/6/2 Felipe Pena > >> Hi, >> >> 2011/6/2 Michael Maclean >> >>> On 02/06/11 18:20, Gustavo Lopes wrote: >>> Em Thu, 02 Jun 2011 18:10:50 +0100, Ilia Alshanetsky escreveu:  Killing TSRML

Re: [PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread dukeofgaming
How about a separate email topic dedicated to voting?, that would reduce the signal to noise ratio for votes (and increase it for opinions). Regards, David On Fri, Jun 3, 2011 at 10:25 AM, Martin Scotta wrote: > Martin Scotta > > > On Fri, Jun 3, 2011 at 5:16 AM, Pierre Joye wrote: > > > hi D

Re: [PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Martin Scotta
Martin Scotta On Fri, Jun 3, 2011 at 5:16 AM, Pierre Joye wrote: > hi Derick, > > On Fri, Jun 3, 2011 at 9:45 AM, Derick Rethans wrote: > > On Thu, 2 Jun 2011, Stas Malyshev wrote: > > > >> I'd like to set up a vote for the undecided TODO features on > >> wiki.php.net, anybody could help me w

Re: [PHP-DEV] RFC: Enum

2011-06-03 Thread Marcel Esser
On 6/3/2011 8:27 AM, Dennis Haarbrink wrote: As soon as I have my requested write permission in the rfc namespace i will update it. -- Dennis Haarbrink 2011/6/3 Pierrick Charron Hi, The RFC was supposed to be a draft (i didn't really added it in the good section) and was written more to int

Re: [PHP-DEV] RFC: Enum

2011-06-03 Thread Dennis Haarbrink
As soon as I have my requested write permission in the rfc namespace i will update it. -- Dennis Haarbrink 2011/6/3 Pierrick Charron > Hi, > > The RFC was supposed to be a draft (i didn't really added it in the good > section) and was written more to introduce the idea and make people think >

Re: [PHP-DEV] RFC: Enum

2011-06-03 Thread Pierrick Charron
Hi, The RFC was supposed to be a draft (i didn't really added it in the good section) and was written more to introduce the idea and make people think about it. Feel free to update it with any idea, concern you may have. Pierrick On 3 June 2011 03:26, Dennis Haarbrink wrote: > One thing I woul

Re: [PHP-DEV] [PATCH] Notice on array to string convertion

2011-06-03 Thread Patrick ALLAERT
2011/6/2 Ilia Alshanetsky : > I like the idea of an error message when this happens, but as few > other people in the thread had mentioned, I think it should be a > warning (E_WARNING) because the conversion results in data loss > (content of the array is replaced with "Array" string). My initial

Re: [PHP-DEV] RFC: Enum

2011-06-03 Thread Richard Quadling
On 3 June 2011 08:26, Dennis Haarbrink wrote: > So, to sum up: > - Do we really need enum level methods? > - Need to reach consensus on default values (strings vs auto inc. ints) > - RFC needs to be updated, explaining the type hinting of enums in method > signatures I'm wondering if the enum st

Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] Local PHP docs with search facility

2011-06-03 Thread Richard Riley
Hannes Magnusson writes: > On Fri, Jun 3, 2011 at 12:56, Richard Riley wrote: >> Hannes Magnusson writes: >> >>> On Fri, Jun 3, 2011 at 12:39, Richard Riley wrote: Hannes Magnusson writes: > On Fri, Jun 3, 2011 at 06:41, Richard Riley > wrote: >> Hannes Magnusson writ

[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] Local PHP docs with search facility

2011-06-03 Thread Hannes Magnusson
On Fri, Jun 3, 2011 at 12:56, Richard Riley wrote: > Hannes Magnusson writes: > >> On Fri, Jun 3, 2011 at 12:39, Richard Riley wrote: >>> Hannes Magnusson writes: >>> On Fri, Jun 3, 2011 at 06:41, Richard Riley wrote: > Hannes Magnusson writes: > >> On Thu, Jun 2, 2011 at 21:

Re: [PHP-DEV] autoconf 2.60+ support

2011-06-03 Thread Rune Kaagaard
I compiled trunk on Ubuntu 11.04 desktop yesterday with default settings and was surprised and confused when it worked even after I forgot to use the older autoconf binary. Nice job! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Local PHP docs with search facility

2011-06-03 Thread Hannes Magnusson
On Fri, Jun 3, 2011 at 12:39, Richard Riley wrote: > Hannes Magnusson writes: > >> On Fri, Jun 3, 2011 at 06:41, Richard Riley wrote: >>> Hannes Magnusson writes: >>> On Thu, Jun 2, 2011 at 21:03, Richard Riley wrote: > > Could some kind soul advise me on how to install php docs l

Re: [PHP-DEV] Local PHP docs with search facility

2011-06-03 Thread Richard Riley
Hannes Magnusson writes: > On Fri, Jun 3, 2011 at 06:41, Richard Riley wrote: >> Hannes Magnusson writes: >> >>> On Thu, Jun 2, 2011 at 21:03, Richard Riley wrote: Could some kind soul advise me on how to install php docs localy and have the excellent patterns search work based

Re: [PHP-DEV] Local PHP docs with search facility

2011-06-03 Thread Hannes Magnusson
On Fri, Jun 3, 2011 at 06:41, Richard Riley wrote: > Hannes Magnusson writes: > >> On Thu, Jun 2, 2011 at 21:03, Richard Riley wrote: >>> >>> Could some kind soul advise me on how to install php docs localy and >>> have the excellent patterns search work based on an sqllite database? >> >> https

Re: [PHP-DEV] Local PHP docs with search facility

2011-06-03 Thread Hannes Magnusson
On Fri, Jun 3, 2011 at 00:41, Richard Riley wrote: > Nathan Nobbe writes: > >> On Thu, Jun 2, 2011 at 4:01 PM, Philip Olson wrote: >> >>> >>> On Jun 2, 2011, at 2:46 PM, Richard Riley wrote: >>> >>> > Hannes Magnusson writes: >>> > >>> >> On Thu, Jun 2, 2011 at 21:03, Richard Riley >>> wrote:

[PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Derick Rethans
On Fri, 3 Jun 2011, Stas Malyshev wrote: > > - a call to vote is easily drowned out on the ML with all the noise > > I read the same ML as you do :) Using threaded email client it is very > easy to separate new threads and see calls for votes. That is subjective. And even with a threaded client

Re: [PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Pierre Joye
hi Derick, On Fri, Jun 3, 2011 at 9:45 AM, Derick Rethans wrote: > On Thu, 2 Jun 2011, Stas Malyshev wrote: > >> I'd like to set up a vote for the undecided TODO features on >> wiki.php.net, anybody could help me with setting up the voting module >> there if there's such thing on the wiki? Or set

[PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Stas Malyshev
Hi! - a call to vote is easily drowned out on the ML with all the noise I read the same ML as you do :) Using threaded email client it is very easy to separate new threads and see calls for votes. Also, voting on ML does not solve the "drowning out" problem, it makes it worse as about 80% o

Re: [PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Drak
Have you guys considered doodle.com? I think you are all stressing way too much over the voting process. When a vote is closed you can then transfer the decision to the RFC. Drak On 3 June 2011 14:12, Pierre Joye wrote: > On Fri, Jun 3, 2011 at 10:22 AM, Derick Rethans wrote: > > On Fri, 3 J

Re: [PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Pierre Joye
On Fri, Jun 3, 2011 at 10:22 AM, Derick Rethans wrote: > On Fri, 3 Jun 2011, Stas Malyshev wrote: > >> > Voting on the wiki? Yuck. If you want participation, do it here on the >> > mailinglist and store the record in the wiki. If all "votes" are showing >> >> Voting on ML is messy and means somebo

[PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Derick Rethans
On Fri, 3 Jun 2011, Stas Malyshev wrote: > > Voting on the wiki? Yuck. If you want participation, do it here on the > > mailinglist and store the record in the wiki. If all "votes" are showing > > Voting on ML is messy and means somebody needs to read every message on the > list and look for vote

Re: [PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Michael Shadle
Why doesnt voting happen using a poll/voting engine. Written in (gasp) PHP! (although soon PJSON) On Jun 3, 2011, at 1:03 AM, Stas Malyshev wrote: > Hi! > >> Voting on the wiki? Yuck. If you want participation, do it here on the >> mailinglist and store the record in the wiki. If all "votes"

[PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Stas Malyshev
Hi! Voting on the wiki? Yuck. If you want participation, do it here on the mailinglist and store the record in the wiki. If all "votes" are showing Voting on ML is messy and means somebody needs to read every message on the list and look for votes, however long, tedious and offtopic the disc

Re: [PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Alexey Shein
2011/6/3 Derick Rethans : > On Thu, 2 Jun 2011, Stas Malyshev wrote: > >> I'd like to set up a vote for the undecided TODO features on >> wiki.php.net, anybody could help me with setting up the voting module >> there if there's such thing on the wiki? Or set me up with the access >> to wiki machine

Re: [PHP-DEV] [PATCH] Notice on array to string convertion

2011-06-03 Thread Derick Rethans
On Thu, 2 Jun 2011, Ilia Alshanetsky wrote: > I like the idea of an error message when this happens, but as few > other people in the thread had mentioned, I think it should be a > warning (E_WARNING) because the conversion results in data loss > (content of the array is replaced with "Array" stri

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread Derick Rethans
On Thu, 2 Jun 2011, David Zülke wrote: > Just because the MongoDB developers were stupid enough to build a > query language on top of JSON does not mean that JSON or JavaScript > object literals need to be supported in PHP. Can't agree more there. Derick -- http://derickrethans.nl | http://

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread Derick Rethans
On Wed, 1 Jun 2011, Pierre Joye wrote: > pls add your svn handle in the right section: > https://wiki.php.net/rfc/shortsyntaxforarrays/vote Voting does not belong on some wiki. It belongs here on the mailinglist. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, vi

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread Derick Rethans
On Tue, 31 May 2011, Brian Moon wrote: > Contra: Antony Dovgal, Derick Rethans, Jani Taskinen, Lokrain, Felipe Pena, > Lukas Kahwe Smith, Marcus Boerger, David Soria Parra, Johannes Schlüter, > Maciek Sokolewicz, Philip Olson, Ilia Alshanetsky, Daniel Brown, Jochem Maas, > Hannes Magnusson, David

[PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Derick Rethans
On Thu, 2 Jun 2011, Stas Malyshev wrote: > I'd like to set up a vote for the undecided TODO features on > wiki.php.net, anybody could help me with setting up the voting module > there if there's such thing on the wiki? Or set me up with the access > to wiki machine and I'll install it :) Votin

Re: [PHP-DEV] [PATCH] Notice on array to string convertion

2011-06-03 Thread Ferenc Kovacs
On Fri, Jun 3, 2011 at 1:05 AM, Arvids Godjuks wrote: > +1 on E_NOTICE > 02.06.2011 19:13 пользователь "Ilia Alshanetsky" > написал: > > I like the idea of an error message when this happens, but as few > > other people in the thread had mentioned, I think it should be a > > warning (E_WARNING)

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-03 Thread Eloy Bote Falcon
Oops, it was a mistake. I replied to all rather than to the list, so I apologize because I wanted to give my opinion in general and not to reply to anybody in particular. Regards. 2011/6/2 John Crenshaw > There’s no need to be rude. If you can’t make your point without attacking > people, then

[PHP-DEV] RFC: Enum

2011-06-03 Thread Dennis Haarbrink
One thing I would really like to see in 5.4 is enums. There is already an RFC for that: https://wiki.php.net/rfc/enum This was discussed in february this year, but no consensus was reached. IIRC, the most notable problems were: - What is the 'value' of enum constant: string or int, user defined sc