Re: [PHP-DEV] Consolidation of Traversable and array operations

2015-07-16 Thread Tjerk Meesters
Hi! On Thu, Jul 16, 2015 at 6:39 PM Michael Wallner m...@php.net wrote: On 16/07/15 11:26, Rowan Collins wrote: Benjamin Eberlei wrote on 15/07/2015 21:19: But instanceof and anything related to Reflection or get_class or relevant code will fail on array. Ah, yes, I hadn't thought

[PHP-DEV] Consolidation of Traversable and array operations

2015-07-15 Thread Tjerk Meesters
Hi! A few weeks ago I resurrected a two year old proposal for adding two array functions, namely array_every() and array_some(), modelled after their JavaScript equivalent. https://github.com/php/php-src/pull/1385 The most notable comment was that it would be nice to support Traversable as well

Re: [PHP-DEV] Possible Bug or Bad Expectations?

2015-07-11 Thread Tjerk Meesters
On Sun, Jul 12, 2015 at 2:52 AM Ralph Schindler ra...@ralphschindler.com wrote: Hi all, I am conflicted as per if what I experience in this code should be throwing a notice in E_STRICT: http://3v4l.org/srm5f ?php error_reporting(E_ALL); $foo = ['bar' = ['baz' = 5]]; $bar =

Re: [PHP-DEV] PR #1325 - array_column() for array of objects

2015-06-11 Thread Tjerk Meesters
On 12 Jun 2015, at 10:00 am, Xinchen Hui larue...@php.net wrote: Hey: On Fri, Jun 12, 2015 at 9:31 AM, Tjerk Meesters tjerk.meest...@gmail.com wrote: Hi, I've created a PR here: https://github.com/php/php-src/pull/1325 This enhancement allows for properties on objects to work

[PHP-DEV] PR #1325 - array_column() for array of objects

2015-06-11 Thread Tjerk Meesters
Hi, I've created a PR here: https://github.com/php/php-src/pull/1325 This enhancement allows for properties on objects to work in the same way as arrays for the inner elements of the main array. It also supports the __get() method, provided that also __isset() is implemented and returns true

Re: [PHP-DEV] [VOTE] Abstract final / Static classes

2014-12-19 Thread Tjerk Meesters
On 13 Dec 2014, at 00:35, guilhermebla...@gmail.com wrote: RFC is updated exposing both possible usages with both explanations. Hope it doesn't confuse even more. Hi, in your As static class” example, it doesn’t really demonstrate that you can omit the “static” modifier from the function

[PHP-DEV] What ZEND_ACC_ALLOW_STATIC is supposed to do

2014-12-15 Thread Tjerk Meesters
Hi, I was looking at the documentation for DOMDocument::loadHTML() [1] that mentions the following: This function may also be called statically to load and create a DOMDocument object. The static invocation may be used when no DOMDocument properties need to be set prior to loading.

Re: [PHP-DEV] enhance fget to accept a callback

2014-11-23 Thread Tjerk Meesters
Hi! On 24 Nov 2014, at 02:39, Bill Salak b...@devtemple.com wrote: Hi list, I'm considering writing an RFC to add a 3rd parameter to fgets which accepts a user defined function. If we had this today we wouldn't need fgetcsv with the added benefit of fgetcsv style support for data

[PHP-DEV] Re: fgetcsv incompatible with fputcsv

2014-11-20 Thread Tjerk Meesters
On 21 Nov 2014, at 02:14, Christoph Becker cmbecke...@gmx.de wrote: Tjerk Meesters wrote: On 20 Nov 2014, at 00:26, Christoph Becker cmbecke...@gmx.de wrote: Are you aware of https://bugs.php.net/bug.php?id=50686? It seems this very inconsistency has been reported a few years ago

[PHP-DEV] Re: fgetcsv incompatible with fputcsv

2014-11-19 Thread Tjerk Meesters
Hi list, As I was fiddling with CSV data reading and writing I noticed that fgetcsv() is inherently incompatible with fputcsv() when it comes to the enclosure escape character that’s used. Example: http://3v4l.org/LHEZj The above example code demonstrates how, by default, fputcsv() encodes a

[PHP-DEV] Re: fgetcsv incompatible with fputcsv

2014-11-19 Thread Tjerk Meesters
Hi list, As I was fiddling with CSV data reading and writing I noticed that fgetcsv() is inherently incompatible with fputcsv() when it comes to the enclosure escape character that’s used. Example: http://3v4l.org/LHEZj The above example code demonstrates how, by default, fputcsv() encodes a

[PHP-DEV] Re: fgetcsv incompatible with fputcsv

2014-11-19 Thread Tjerk Meesters
On 20 Nov 2014, at 00:26, Christoph Becker cmbecke...@gmx.de wrote: Tjerk Meesters wrote: Hi list, As I was fiddling with CSV data reading and writing I noticed that fgetcsv() is inherently incompatible with fputcsv() when it comes to the enclosure escape character that’s used

Re: [PHP-DEV] RFC: PHP 7.0 timeline

2014-10-14 Thread Tjerk Meesters
On 15 Oct 2014, at 01:24, Rasmus Lerdorf ras...@lerdorf.com wrote: On 10/14/2014 10:14 AM, Stas Malyshev wrote: Hi! IMO, AST, INT64, NG, Uniforme variables style is enough for a new marjor version.. why we still need to wait? We don't need to just wait, as sit and do nothing. We need

Re: [PHP-DEV] Possibilities to fix some really poor behaviors in PHP7

2014-10-14 Thread Tjerk Meesters
On 15 Oct, 2014, at 9:23 am, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! For the array-to-object conversion, no scanning is necessary, since the internal implementation already knows which keys are integers and which strings. For the vast majority of cases, the array passed in

Re: [PHP-DEV] disallow non-static method calls with self/static in PHP 7

2014-10-12 Thread Tjerk Meesters
On 12 Oct 2014, at 16:37, Robert Stoll p...@tutteli.ch wrote: Hey, I just stumbled over a method call of a non-static method with self and was asking myself again, why does PHP support this behaviour. An example to outline what I am writing of: class A{ function foo(){

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Remove support for classes without class entries: Zend/zend_API.c Zend/zend_builtin_functions.c Zend/zend_closures.c Zend/zend_execute.h Zend/zend_interfaces.c

2014-10-09 Thread Tjerk Meesters
Hi On 10 Oct 2014, at 03:57, Dmitry Stogov dmi...@zend.com wrote: Yeah, JavaBridge used it, but it doesn't means it need it. zend_class_entry * _php_java_get_class_entry(zval *object TSRMLS_DC) { return java_class; } I agree, it would be better if we would discuss it on @internals,

[PHP-DEV] Fixes for (Recursive)RegexIterator

2014-10-07 Thread Tjerk Meesters
Hi, I’ve addressed bug #68128 with the following PR: https://github.com/php/php-src/pull/865 As usual, I went in fixing one thing and ended up changing more until the results started to make sense. I would appreciate another pair of eyes to glance over the changed code :) Also, I’m hoping to

Re: [PHP-DEV] Can someone merge `Catchable Call to a member function bar() on a non-object`?

2014-10-05 Thread Tjerk Meesters
Hi! On 16 Sep 2014, at 01:42, Timm Friebe p...@thekid.de wrote: Hi everyone, Timm Friebe p...@thekid.de hat am 16. August 2014 um 18:09 geschrieben: two weeks ago, the RFC `Catchable Call to a member function bar() on a non-object` was accepted by a vote. I don't have commit access to

Re: [PHP-DEV] Regression in RecursiveRegexIterator

2014-10-05 Thread Tjerk Meesters
Hi! On 4 Oct 2014, at 03:38, Ivan Enderlin @ Hoa ivan.ender...@hoa-project.net wrote: Hello :-), Does anyone know something about this bug: https://bugs.php.net/bug.php?id=68128 ? Yeah, I’ve addressed it with a PR: https://github.com/php/php-src/pull/865 Basically, this behaviour was

Re: [PHP-DEV] Bug #68063: session-related, how to fix it?

2014-09-20 Thread Tjerk Meesters
On 20 Sep, 2014, at 11:35 pm, Florian Margaine flor...@margaine.com wrote: Hi list, I saw this interesting bug: https://bugs.php.net/bug.php?id=68063 Basically, if `session_id('')` is run before `session_start()`, weird things happen. The bug reporter proposes 2 ways to fix this:

Re: [PHP-DEV] Internationalized Domain Name support in FILTER_VALIDATE_URL

2014-09-18 Thread Tjerk Meesters
On 19 Sep 2014, at 06:52, Andrea Faulds a...@ajf.me wrote: On 18 Sep 2014, at 21:26, Kévin Dunglas dung...@gmail.com wrote: I'm working on enhancing the FILTER_VALIDATE_URL filter ( https://github.com/php/php-src/pull/826). The current implementation does not support validation of

[PHP-DEV] Re: Internationalized Domain Name support in FILTER_VALIDATE_URL

2014-09-18 Thread Tjerk Meesters
by default (if present). Personally I wouldn't mind having this for 5.6 as well if the upgrade path is clean, but the cleanest path I could think of involves having two flags that do the opposite action :) Le vendredi 19 septembre 2014, Tjerk Meesters tjerk.meest...@gmail.com a écrit : On 19 Sep

[PHP-DEV] Fix for #68021

2014-09-17 Thread Tjerk Meesters
Hi, I’ve authored a fix for browscap: https://github.com/php/php-src/pull/827 Bug report: https://bugs.php.net/bug.php?id=68021 It replaces the current expression delimiters of \xA7 with a tilde (~) that’s ASCII compatible and therefore plays nice with UTF-8. Seems like a no-brainer to apply

Re: [PHP-DEV] Deprecated functions

2014-09-10 Thread Tjerk Meesters
() {} public function bar() {} } deprecated class OldStuff {} deprecated function someOldFunction() {} This RFC will give more control over 'deprecated' functionality and can be easily tested. Thoughts? 2014-09-10 9:42 GMT+04:00 Tjerk Meesters tjerk.meest...@gmail.com: Hi, When I

[PHP-DEV] Deprecated functions

2014-09-09 Thread Tjerk Meesters
Hi, When I was fixing test cases on my `kill-ereg` branch I noticed a Reflection test case for `ReflectionFunction::isDeprecated()`. The problem with such a test case is that you’d be chasing deprecated functions to tests against as we move along; this is the current list of deprecated

Re: [PHP-DEV] setcookie() minor BC break - fixes issue #67736

2014-09-08 Thread Tjerk Meesters
Hi! On Sat, Sep 6, 2014 at 5:38 AM, Florian Margaine flor...@margaine.com wrote: Hi, This is a minor BC break, but still a BC break, so worth discussing on this ML. When a second setcookie() is done with the same name, a warning is emitted, because the ietf rfc 6265 says it *should* only

Re: [PHP-DEV] Kill ereg with fire

2014-08-31 Thread Tjerk Meesters
Hi Ferenc, On 31 Aug, 2014, at 7:00 pm, Ferenc Kovacs tyr...@gmail.com wrote: On Sun, Aug 31, 2014 at 7:08 AM, Tjerk Meesters tjerk.meest...@gmail.com wrote: Hi internals (again), Recently I’ve done a small assessment on how feasible it is to remove ext/ereg from the project

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Tjerk Meesters
Hi Stas, On 30 Aug, 2014, at 2:08 pm, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! I would like to propose a few changes to our heredoc / nowdoc scanner to make it less awkward to use inside other constructs. https://wiki.php.net/rfc/heredoc-scanner-loosening Let me know your

[PHP-DEV] Making parse_ini_*() aware of types

2014-08-30 Thread Tjerk Meesters
Hi internals, I was going through the bug list and found this report: https://bugs.php.net/bug.php?id=38409 It discusses the fact that `parse_ini_file()` and `parse_ini_string()` throw away type information; for instance, the flag “on” doesn’t translate into a bool(true) but string(“1”). The

Re: [PHP-DEV] destructors and output_buffering

2014-08-30 Thread Tjerk Meesters
On 31 Aug, 2014, at 9:33 am, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! I was looking at bug https://bugs.php.net/bug.php?id=67644 and it looks like we have a bit of a problem with output buffering and dtors on shutdown. Basically, right now our code looks like this: /* 2.

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Tjerk Meesters
On 31 Aug, 2014, at 6:12 am, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! There’s no real objective measure with which I can answer such questions :) The closest I could come to a rebuttal is if there’s no real need to make the syntax so restrictive, why not make it less restrictive?

Re: [PHP-DEV] destructors and output_buffering

2014-08-30 Thread Tjerk Meesters
On 31 Aug, 2014, at 12:40 pm, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! This is just a thought; could we delay the call to `zend_call_destructors` ONLY IF there’s output buffering taking place (i.e. ob_get_level() 0)? That wouldn't help - imagine this: 1. ob_start is set 2.

[PHP-DEV] Kill ereg with fire

2014-08-30 Thread Tjerk Meesters
Hi internals (again), Recently I’ve done a small assessment on how feasible it is to remove ext/ereg from the project for the next major version. This is the result (so far): https://github.com/datibbaw/php-src/compare/kill-ereg I’ve replaced two instances of ereg with their pcre equivalents,

[PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-29 Thread Tjerk Meesters
Hi internals, I would like to propose a few changes to our heredoc / nowdoc scanner to make it less awkward to use inside other constructs. https://wiki.php.net/rfc/heredoc-scanner-loosening Let me know your thoughts :) Best, Tjerk (@datibbaw) -- PHP Internals - PHP Runtime Development

Re: [PHP-DEV] Documentation error

2014-08-28 Thread Tjerk Meesters
Hi Alain, On 29 Aug, 2014, at 8:43 am, Alain Williams a...@phcomp.co.uk wrote: I notice that in the precedence chart the new **= operator is missing: http://uk1.php.net/manual/en/language.operators.precedence.php The announcement (below) says that it is right associative, but the

[PHP-DEV] Re: Fast Parameter Parsing API

2014-08-27 Thread Tjerk Meesters
Hi all, Now that we’re slowly settling into the new big changes that were recently pushed into master, perhaps it’s a good time to review the Fast_ZPP proposal and put it to a vote. It’s already present in functions that are deemed to benefit most from this optimisation, which is what it was

[PHP-DEV] Re: zpp and zend_string

2014-08-26 Thread Tjerk Meesters
Hi internals, With the recent merge of int64 the `zend_string` type now uses `size_t` to store its length, but ZPP (and friends) still use `int *` to store the parsed string lengths. http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_API.c#519 This look like an oversight. Will this be fixed as well?

Re: [PHP-DEV] Fwd: date extension broken tests

2014-08-25 Thread Tjerk Meesters
Hi! On 25 Aug, 2014, at 5:43 pm, Dmitry Stogov dmi...@zend.com wrote: Hi Derick, Could you please take a look into these tests failures. I actually, think that the new behavior is right. Calls to parent::__constructor() shouldn't change value of already constructed $this. I think the

Re: [PHP-DEV] [RFC] Binary String Comparison

2014-08-20 Thread Tjerk Meesters
On Tue, Aug 19, 2014 at 11:07 AM, Tjerk Meesters tjerk.meest...@gmail.com wrote: On Mon, Aug 18, 2014 at 11:30 PM, Johannes Schlüter johan...@schlueters.de wrote: On Mon, 2014-08-18 at 23:09 +0800, Tjerk Meesters wrote: On 18 Aug, 2014, at 10:47 pm, Johannes Schlüter johan

Re: [PHP-DEV] [RFC] Binary String Comparison

2014-08-18 Thread Tjerk Meesters
On 18 Aug, 2014, at 10:47 pm, Johannes Schlüter johan...@schlueters.de wrote: On Mon, 2014-08-18 at 14:44 +0200, Marc Bennewitz wrote: The question isn't What's wrong with ===, strcmp()? but What's wrong with ==, , ?. We have a standard way to compare two operands but currently we do

Re: [PHP-DEV] [RFC] Binary String Comparison

2014-08-18 Thread Tjerk Meesters
On Mon, Aug 18, 2014 at 11:30 PM, Johannes Schlüter johan...@schlueters.de wrote: On Mon, 2014-08-18 at 23:09 +0800, Tjerk Meesters wrote: On 18 Aug, 2014, at 10:47 pm, Johannes Schlüter johan...@schlueters.de wrote: On Mon, 2014-08-18 at 14:44 +0200, Marc Bennewitz wrote

[PHP-DEV] Evaluation of constructor arguments if there's no constructor

2014-08-14 Thread Tjerk Meesters
Hi internals, I was sifting through the bucket o’ bugs and found these two related issues: https://bugs.php.net/bug.php?id=67829 https://bugs.php.net/bug.php?id=54162 (closed) They concern the behaviour of the engine when a class defines no constructor or if the class to be instantiated doesn’t

Re: [PHP-DEV] [RFC] Simplified Array API for extensions

2014-08-11 Thread Tjerk Meesters
On 12 Aug, 2014, at 5:03 am, Andrea Faulds a...@ajf.me wrote: On 11 Aug 2014, at 22:00, Hannes Magnusson hannes.magnus...@gmail.com wrote: I think it would be fantastic if this would be included in 5.6. Too late for 5.6, but 5.7 perhaps (can we please have this? 7 will break BC and

Re: [PHP-DEV] Is fgetss() useless?

2014-07-29 Thread Tjerk Meesters
Hi Maciej, On Mon, Jul 28, 2014 at 7:21 PM, Maciej Sobaczewski msobaczew...@gmail.com wrote: Hello guys, so... fgetss(). We have such a beautiful function in PHP. As it's described in the manual: Get line from file pointer and strip HTML tags. I'm wondering if it has any

Re: [PHP-DEV] signed long hash index for PHP7?

2014-07-29 Thread Tjerk Meesters
Hi, On Wed, Jul 30, 2014 at 10:37 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi all, Current Zend hash uses ulong for numeric array indexes. This causes bug #67693 https://bugs.php.net/bug.php?id=67693 Signed/unsigned mismatch is the root cause of this bug. Since PHP's int is signed by

Re: [PHP-DEV] RFC: Move phpng to master

2014-07-24 Thread Tjerk Meesters
Hi Dmitry, On 25 Jul, 2014, at 6:09 am, Dmitry Stogov dmi...@zend.com wrote: any one may vote according to their thoughts I'm not going to persuade any one. I already know the opinion of the majority. Unfortunately, now many people lessen to the guys who speaks a lot. I was never able to

Re: [PHP-DEV] php interactive shell: save history on SIGINT exit

2014-07-23 Thread Tjerk Meesters
On 23 Jul, 2014, at 8:38 pm, Johannes Schlüter johan...@schlueters.de wrote: On Mon, 2014-07-21 at 18:17 +0400, Dmitry Saprykin wrote: changed write_history at the end to append_history after each cli_is_valid_code. Now it is -1 line, +1 line commit and completely looks like bug fix. )

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Fix bug #67064 = Countable interface inconsistency

2014-07-23 Thread Tjerk Meesters
Hi! On Wed, Jul 23, 2014 at 4:26 PM, Remi Collet r...@famillecollet.com wrote: Notice, All Internal classes, implementing Countable still doesn't accept this optional parameter. Ex: Method [ internal:SPL, prototype Countable public method count ] { - Parameters [0]

Re: [PHP-DEV] Deprecating GD functions imagettftext/bbox

2014-07-23 Thread Tjerk Meesters
Hi Lonny, On Wed, Jul 23, 2014 at 3:01 AM, Lonny Kapelushnik lo...@lonnylot.com wrote: Morning, I propose deprecating two GD functions: imagettftext and imagettfbbox. The reasons I would like to deprecate them are: 1. Their functionality is a subset of imagefttext and imageftbbox 2. The

Re: [PHP-DEV] What's wrong with these hashtable iteration code?

2014-07-20 Thread Tjerk Meesters
On Mon, Jul 21, 2014 at 11:12 AM, Aaron Lewis the.warl0ck.1...@gmail.com wrote: Hi, I'm trying to iterate through a hash table, But the zend_hash_get_current_key() doesn't seem to move forward: I'm getting duplicate output at the 'fprintf' part.

Re: [PHP-DEV] crypt() BC issue

2014-07-17 Thread Tjerk Meesters
On Thu, Jul 17, 2014 at 10:25 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Tjerk, On Thu, Jul 17, 2014 at 11:09 AM, Tjerk Meesters tjerk.meest...@gmail.com wrote: Why should `password_verify()` work on a hash that wasn't generated with `password_hash()`? The fact that it uses `crypt

Re: [PHP-DEV] [RFC] intdiv()

2014-07-17 Thread Tjerk Meesters
On Fri, Jul 18, 2014 at 10:47 AM, Kris Craig kris.cr...@gmail.com wrote: On Thu, Jul 17, 2014 at 6:31 AM, Andrea Faulds a...@ajf.me wrote: On 17 Jul 2014, at 10:24, Nikita Popov nikita@gmail.com wrote: This is already what is currently happening, see

Re: [PHP-DEV] [RFC] intdiv()

2014-07-17 Thread Tjerk Meesters
On Fri, Jul 18, 2014 at 12:04 PM, Kris Craig kris.cr...@gmail.com wrote: On Thu, Jul 17, 2014 at 8:39 PM, Tjerk Meesters tjerk.meest...@gmail.com wrote: On Fri, Jul 18, 2014 at 10:47 AM, Kris Craig kris.cr...@gmail.com wrote: On Thu, Jul 17, 2014 at 6:31 AM, Andrea Faulds a...@ajf.me

Re: [PHP-DEV] [RFC] intdiv()

2014-07-16 Thread Tjerk Meesters
Hi Sara, On Thu, Jul 17, 2014 at 8:25 AM, Sara Golemon poll...@php.net wrote: On Wed, Jul 16, 2014 at 8:15 AM, Andrea Faulds a...@ajf.me wrote: Nikita Popov doesn’t seem to be a fan of the %% syntax, so it may be subject to change, though I think it’s the best I’ve heard so far. ;) Nor am

Re: [PHP-DEV] crypt() BC issue

2014-07-16 Thread Tjerk Meesters
Hi, On Thu, Jul 17, 2014 at 9:06 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Sara, On Thu, Jul 17, 2014 at 8:53 AM, Sara Golemon poll...@php.net wrote: At the risk of perhaps missing the point, wouldn't it be more useful to encourage users in some way (perhaps through documentation

Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening)

2014-07-13 Thread Tjerk Meesters
On 13 Jul, 2014, at 11:17 pm, Rowan Collins rowan.coll...@gmail.com wrote: On 13/07/2014 15:59, Jocelyn Fournier wrote: From my point of view, if the type annotations are doing implicit cast (with or without E_NOTICE/E_STRICT warning), they should behave exactly the same than an explicit

[PHP-DEV] Travis CI for pull requests

2014-07-11 Thread Tjerk Meesters
Hi guys, After making another commit into my ucwords() pr and waiting for an hour or so I noticed that Travis CI hasn’t picked it up yet; in fact, the previous commit wasn’t picked up either. Other pr’s that were created before or after mine were processed, though. Is this a known issue? It

Re: [PHP-DEV] Travis CI for pull requests

2014-07-11 Thread Tjerk Meesters
Hi! On 11 Jul, 2014, at 4:29 pm, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! And while I was trying to figure out what does that mean, or why should that prevent the travis build, I've just remembered that we don't allow travis builds for PHP-5.3 and PHP-5.4 branches:

Re: [PHP-DEV] not_null function

2014-07-05 Thread Tjerk Meesters
On Sat, Jul 5, 2014 at 9:22 AM, Kris Craig kris.cr...@gmail.com wrote: On Fri, Jul 4, 2014 at 2:38 PM, Xen x...@dds.nl wrote: On Fri, 4 Jul 2014, Levi Morrison wrote: For completeness, it is available in Perl and I believe Perl had it first; not completely sure though. Okay, I

Re: [PHP-DEV] not_null function

2014-07-05 Thread Tjerk Meesters
On Sat, Jul 5, 2014 at 3:39 PM, Tjerk Meesters tjerk.meest...@gmail.com wrote: On Sat, Jul 5, 2014 at 9:22 AM, Kris Craig kris.cr...@gmail.com wrote: On Fri, Jul 4, 2014 at 2:38 PM, Xen x...@dds.nl wrote: On Fri, 4 Jul 2014, Levi Morrison wrote: For completeness, it is available

[PHP-DEV] Bug tracker stats oddity

2013-10-23 Thread Tjerk Meesters
Hi, It felt a bit weird to report a bug about the bug tracker, so I decided to post it here. I came across this random bug: https://bugs.php.net/bug.php?id=64386 The stats are: Votes:105Avg. Score:2.1 ± 1.0Reproduced:1 of 12 (8.3%)Same Version:25769803765 (2576980376500.0%)Same OS:30064771059

Re: [PHP-DEV] RFC: Expectations

2013-10-21 Thread Tjerk Meesters
On Mon, Oct 21, 2013 at 4:16 PM, Michael Wallner m...@php.net wrote: On 21 October 2013 10:13, Patrick Schaaf b...@bof.de wrote: Am 21.10.2013 03:52 schrieb Joe Watkins krak...@php.net: So looks like we need a new name ?? Ideas ?? abstract EXPRESSION wat? abstract is already a

Re: [PHP-DEV] Wiki karma, por favor.

2013-10-03 Thread Tjerk Meesters
Bump. On 3 Oct, 2013, at 3:23 AM, Madara Uchiha mad...@tchizik.com wrote: +1! This guy is epic! On Mon, Sep 30, 2013 at 10:56 PM, Daniel Lowrey rdlow...@gmail.com wrote: Good day, security-conscious internals people. I'm ready to float an RFC + patch for default SSL/TLS peer verification

Re: [PHP-DEV] Regenerating session ID automatically when IP address has changed

2013-09-30 Thread Tjerk Meesters
On Sat, Sep 28, 2013 at 6:47 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Leigh, On Fri, Sep 27, 2013 at 7:12 PM, Leigh lei...@gmail.com wrote: So on a successful session hijack (correct SID, new IP) the attacker gets a new SID and keeps the valid session while the legitimate user gets

Re: [PHP-DEV] Failing builds on Travis

2013-09-27 Thread Tjerk Meesters
Hi Mike, On Fri, Sep 27, 2013 at 3:27 PM, Michael Wallner m...@php.net wrote: On 27 September 2013 04:37, Tjerk Meesters tjerk.meest...@gmail.com wrote: Hi, The success of builds on Travis seems to hinge on a particular test case: ext/standard/tests/file/disk_free_space_basic.phpt

Re: [PHP-DEV] Regenerating session ID automatically when IP address has changed

2013-09-27 Thread Tjerk Meesters
Hi, On Fri, Sep 27, 2013 at 6:54 PM, Leigh lei...@gmail.com wrote: On 27 September 2013 11:39, Peter Lind peter.e.l...@gmail.com wrote: On 27 September 2013 12:12, Leigh lei...@gmail.com wrote: So on a successful session hijack (correct SID, new IP) the attacker gets a new SID and

Re: [PHP-DEV] Regenerating session ID automatically when IP address has changed

2013-09-26 Thread Tjerk Meesters
Hi, On Thu, Sep 26, 2013 at 6:19 PM, Leigh lei...@gmail.com wrote: On Sep 24, 2013 3:43 AM, Laruence larue...@php.net wrote: I don't think this is language concerning issue. it could be done in user script.. thanks I agree entirely with Laurence (and others). This shouldn't be a

Re: [PHP-DEV] PR 287 - added use_keys argument to array_filter() [Discussion]

2013-09-26 Thread Tjerk Meesters
Hi, On 27 Sep, 2013, at 12:31 AM, Andrea Faulds a...@ajf.me wrote: On 26/09/2013 05:42, Tjerk Meesters wrote: Hi, I've updated my patch to allow a range of values to be passed as the third argument: pass key, pass value or pass both. Instead of using OR-able constants, I went

Re: [PHP-DEV] PR 287 - added use_keys argument to array_filter() [Discussion]

2013-09-26 Thread Tjerk Meesters
On Fri, Sep 27, 2013 at 7:11 AM, Sherif Ramadan theanomaly...@gmail.comwrote: On Thu, Sep 26, 2013 at 6:51 PM, Tjerk Meesters tjerk.meest...@gmail.comwrote: I deliberately chose these values so that I can simply specify `true` to mean pass both values. Bit masks seem cumbersome

[PHP-DEV] Failing builds on Travis

2013-09-26 Thread Tjerk Meesters
Hi, The success of builds on Travis seems to hinge on a particular test case: ext/standard/tests/file/disk_free_space_basic.phpt It asserts that if a file is written to, the free space after the write must always be lower than the previously recorded value. On a busy system the free space is

Re: [PHP-DEV] PR 287 - added use_keys argument to array_filter() [Discussion]

2013-09-25 Thread Tjerk Meesters
| ARRAY_FILTER_USE_VALUE` instead of a simpler `ARRAY_FILTER_USE_BOTH` or even just `true`. Updated examples can be found here: https://github.com/php/php-src/pull/287 Let me know if there are any major objections to the patch. On Wed, Jun 19, 2013 at 7:15 AM, Tjerk Meesters tjerk.meest

Re: [PHP-DEV] Parsing PUT data

2013-09-24 Thread Tjerk Meesters
On Tue, Sep 24, 2013 at 1:19 PM, Dave catch.d...@gmail.com wrote: Hi All, Firstly, let me know if this is particularly spammy/inappropriate for this list. I just wanted to get some feedback on a long-time feature request (2011) about treating PUT the same as POST in terms of re-using the

Re: [PHP-DEV] Re: crc32() and ip2long() return values

2013-08-30 Thread Tjerk Meesters
Hi, On 30 Aug, 2013, at 11:29 PM, Rasmus Schultz ras...@mindplay.dk wrote: No replies probably means no one cares. oh well. For the record, the examples I posted are wrong - the correct way to convert the long values consistently appears to be: list($v) = array_values(unpack('l',

Re: [PHP-DEV] Request #65501 uniqid(): More entropy parameter should be true by default

2013-08-22 Thread Tjerk Meesters
Hi, On 22 Aug, 2013, at 6:58 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi all, I realized that not many users are using more entropy parameter Therefore, I made Request #65501 uniqid(): More entropy parameter should be true by default https://bugs.php.net/bug.php?id=65501 The

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-27 Thread Tjerk Meesters
Sent from my iPhone On 27 Jun, 2013, at 11:05 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Sherif, I would like to have consistent behavior at least within a function. 2013/6/27 Sherif Ramadan theanomaly...@gmail.com I thought you wanted to add an extra error for malformed hex,

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-27 Thread Tjerk Meesters
On Fri, Jun 28, 2013 at 9:27 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Tjerk, 2013/6/27 Tjerk Meesters tjerk.meest...@gmail.com The thread started with the assertion that it raises a warning and the commits first remove the warning and then adds it again later, so isn't the whole PR

Re: [PHP-DEV] PR 287 - added use_keys argument to array_filter() [Discussion]

2013-06-18 Thread Tjerk Meesters
On 19 Jun, 2013, at 1:04 AM, Patrick Schaaf b...@bof.de wrote: var_dump(array_filter(['foo', '', 'bar'], 'strlen', true)); Warning: strlen() expects exactly 1 parameter, 2 given in - on line 1 Not only do we trigger the error handler (a large enough array causes a performance

Re: [PHP-DEV] Method check - Can someone create a RFC for it?

2013-03-21 Thread Tjerk Meesters
On 21 Mar, 2013, at 2:08 AM, Carlos Rodrigues carlos.v...@gmail.com wrote: Hi, I'd like to suggest a new functionality for PHP. I don't know the internals, and i can't create a patch implementing this. I'm writing here in case someone likes this idea and write a RFC. We've had a problem

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-06 Thread Tjerk Meesters
Sent from my iPhone On 5 Feb, 2013, at 9:20 PM, Martin Keckeis martin.kecke...@gmail.com wrote: http://w3techs.com/**technologies/history_details/**pl-php/5http://w3techs.com/technologies/history_details/pl-php/5use of PHP5.1 is slowing faster than 5.4 use is growing. This is wrong.

Re: [PHP-DEV] stream_get_line behaviour Bug #63240

2012-10-10 Thread Tjerk Meesters
Sent from my iPhone On 10 Oct, 2012, at 6:39 PM, Nicolai Scheer nicolai.sch...@gmail.com wrote: Hi again! Thanks for your help an comments on the issue. cataphract commented on the stream_get_line behaviour (returning false when used on an empty file) on the bug report page. I do

Re: [PHP-DEV] Re: Support negative indexes for arrays and strings

2012-09-04 Thread Tjerk Meesters
On 4 Sep, 2012, at 3:59 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! The terminology negative indexing seems to imply that the feature should work with arrays. To restrict it to just strings might involve creating a term one would only associate with strings. I do not see any way

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-08-31 Thread Tjerk Meesters
On 1 Sep, 2012, at 1:11 AM, Rasmus Schultz ras...@mindplay.dk wrote: Yes, typo! sorry. $array = array(1001, 1002, 1003, 1004); $number = $array[-1]; // = 1004 $array[-1] = 1005; $number = $array[-1]; // = Looking at the resulting code, I would like to point out

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-17 Thread Tjerk Meesters
Sent from my iPhone On 18 Aug, 2012, at 5:41 AM, Sebastian Krebs krebs@gmail.com wrote: Hi, Don't know, how complicated this is (and also someone (not me) must implement it, because I can't :X), but to be in sync with the operators the short ternary operator should be usable in

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Tjerk Meesters
On 21 Jul, 2012, at 2:22 PM, Kris Craig kris.cr...@gmail.com wrote: 1.01 eq 1.1 Could you explain this one to me? In every versioning system I've ever used, 1.1 would be greater than 1.01, not equal. Because 01 is just a padded version of 1, probably used to make it easier for

Re: [PHP-DEV] [RFC] Add hash_pbkdf2 function

2012-06-19 Thread Tjerk Meesters
On 19 Jun, 2012, at 2:24 PM, Adam Jon Richardson adamj...@gmail.com wrote: On Mon, Jun 18, 2012 at 7:14 PM, Anthony Ferrara ircmax...@gmail.com wrote: https://wiki.php.net/rfc/hash_pbkdf2 What are your thoughts? That's very nice, indeed. One thing I'm wondering about is whether the

[PHP-DEV] domdocument loadhtml and encoding

2012-06-01 Thread Tjerk Meesters
Gentlemen, Regarding this bug report: https://bugs.php.net/bug.php?id=49705 As more developers move away from using regular expressions to parse HTML and start using DOMDocument, I've noticed that quite a few stumble over encoding issues. They're not bugs, because it's documented (I think) that

Re: [PHP-DEV] [RFC] Pure PHP Scripts (Updated)

2012-04-24 Thread Tjerk Meesters
On 25 Apr, 2012, at 5:42 AM, Kris Craig kris.cr...@gmail.com wrote: On Tue, Apr 24, 2012 at 1:10 PM, Tom Boutell t...@punkave.com wrote: * The RFC starts off immediately talking about file extensions, but the actual implementation proposed doesn't rely on file extensions or suggest any

Re: [PHP-DEV] Some Stats

2012-04-17 Thread Tjerk Meesters
Maybe this has been suggested before, but it would be nice if comments in, ahem, request for comments could be consolidated into one spot, the RFC page itself. Facebook comments come to mind, though I'm sure there are other solutions based on OpenID, etc. Sent from my iPhone On 18 Apr,

Re: [PHP-DEV] Randomize hash-function in php

2012-03-18 Thread Tjerk Meesters
On 18 Mar, 2012, at 2:32 PM, Xinchen Hui larue...@gmail.com wrote: What if php uses salts for specific hashes only, such as GPC (or all hashes whose lifetime is limited to the current reuqest), and use a zero-value salt for all others? definitely no,thinking of pre-calculated hash.

Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters

2012-03-09 Thread Tjerk Meesters
On 9 Mar, 2012, at 11:20 PM, Lazare Inepologlou linep...@gmail.com wrote: Type casting combined with passing by reference is problematic in many ways. Just an example: fuction foo( string $buffer) { ... } foo( $my_buffer ); Here, $my_buffer has just been declared, so it is null. Should

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Tjerk Meesters
On 22 Feb, 2012, at 2:03 AM, Ralf Lang l...@b1-systems.de wrote: I see no reason why it would be not desirable to have PHP raise the exception rather than putting more or less repeating code snippets all around the place. That is why I am asking. You must be returning false/null somewhere.

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-09-23 Thread Tjerk Meesters
Hi, Ran into this exact issue just the other day. In the pre-5.4 days, to get the first element of a returned array I would use current(). I still think that's correct and shouldn't raise a digital eyebrow. On Sep 23, 2011 8:30 PM, Etienne Kneuss col...@php.net wrote: Hi, On Fri, Sep 23, 2011

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-19 Thread Tjerk Meesters
On Sep 20, 2011 2:10 AM, de...@lucato.it wrote: Hi! I followed the whole discussion, still it is not clear which one is considered good and which bad practice... In ZF 1 and 2, ZendRegistry::__construct() has the following signature with 2 parameters: function __construct($array =

Re: [PHP-DEV] 5.4 beta tests

2011-08-31 Thread Tjerk Meesters
On Aug 31, 2011 12:14 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 08/30/2011 08:39 PM, Stas Malyshev wrote: Hi! I've checked the unit tests on my Mac and I see 48 failures so far. I've put them here: https://wiki.php.net/todo/tests54?#tested_2011-08-30_on_mac_os_x Most of them

Re: [PHP-DEV] Improvements to HTTP stream metadata

2011-06-30 Thread Tjerk Meesters
On Jul 1, 2011 7:31 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! On 6/30/11 2:34 PM, Michael Maclean wrote: The same data also ends up in the bizarre $http_response_headers var that gets spontaneously created in local scope - I've wondered about how good that is to do. This

Re: [PHP-DEV] APC caching - preloading files

2011-01-14 Thread Tjerk Meesters
I generally find it more reliable to use iptables to stop incoming requests while priming the cache using a small script. On Jan 15, 2011 11:43 AM, Bharat Nagwani bnagw...@juniper.net wrote: Hello Experts, Sorry for posting this in this list but I am not finding any documentation on this APC

Re: [PHP-DEV] [PATCH] adding RFC3984 support to http_build_query

2011-01-05 Thread Tjerk Meesters
Instead of a boolean, could you add a rfc-xx selection parameter instead, like, in case one would like rfc 3986 instead? On Jan 5, 2011 8:10 PM, Rui Hirokawa rui_hirok...@yahoo.co.jp wrote: Hello, I made a patch to add the RFC-3984 based url-encoding support into http_build_query(). The

Re: [PHP-DEV] RE : Re: [PHP-DEV] [PATCH] Add option to disable POST data processing

2010-12-07 Thread Tjerk Meesters
Hi, Don't have much knowledge about the internal workings of the engine, but I'm wondering if it's possible to apply lazy loading to the $_POST variable, so that processing only happens if and when it's requested. That way you wouldn't need the ini setting. On Dec 8, 2010 7:54 AM, Patrick

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-28 Thread Tjerk Meesters
-1 The nuisance of updating IDE, search tools etc doesn't outweigh typing 9 characters less imho. On Nov 28, 2010 11:53 PM, Martin Jansen mar...@divbyzero.net wrote:

Re: [PHP-DEV] Re: break/continue $var

2010-11-19 Thread Tjerk Meesters
Reading those notes I'm wondering what's meant by dynamic break is not working? I understand how it could lead to better compilation, but a mere 'not working' at the very least intrigues me :) I have actually used this construct, though its purpose is mainly in parser routines, so I guess I could

  1   2   >