Re: [PHP-DEV] [DRAFT] RFC - array_column() function

2012-06-24 Thread Ralph Schindler
The term 'column' makes a lot of sense for PDO working with database columns, but there is no concept of a 'column' in the array structure or PHP as a whole, outside of database related functions. Actually, while perhaps most of the time a value from a column is what people retrieving from a da

Re: [PHP-DEV] json_encode() behavior for incorrectly encoded strings

2012-06-24 Thread Rasmus Lerdorf
On 06/24/2012 05:12 AM, Nikita Popov wrote: > The main problem with not throwing a warning is that it makes > debugging the error quite hard. json_last_error() only gives you an > error code. So you have to use some script like the one used as an > example in php.net/json_last_error to figure out w

Re: [PHP-DEV] json_encode() behavior for incorrectly encoded strings

2012-06-24 Thread Daniel Convissor
Hola: On Sat, Jun 23, 2012 at 06:03:34PM -0700, Rasmus Lerdorf wrote: > And yes, I don't think a warning from json_encode() is useful because to > properly avoid it you would need an iconv() call before calling it and > that is pure overhead. Short of that your only recourse is to use @ and > that

Re: [PHP-DEV] json_encode() behavior for incorrectly encoded strings

2012-06-24 Thread Nikita Popov
On Sun, Jun 24, 2012 at 12:50 AM, Gustavo Lopes wrote: > If json_encode() is not supposed to receive badly encoded data, then it's > the application writer's responsibility to make sure that the data is > correctly encoded. If, on the other hand, you think that's actually not a > error on the part