Re: [PHP-DEV] RFC: ext/mysql deprecation

2012-11-14 Thread Devis Lucato
Sorry if this was already suggested before: for people stuck on legacy applications and without money to upgrade (e.g. charities, user groups) a PECL extension would at least provide a way to survive. Forcing people to upgrade doesn't sound like an improvement but more of a way to push people away

Re: [PHP-DEV] Generics proposal

2012-10-21 Thread Devis Lucato
of characters it takes to achieve the result. So more power with fewer characters equals elegance http://www.artima.com/weblogs/viewpost.jsp?thread=299081 Devis On 21 October 2012 12:55, Alexey Zakhlestin indey...@gmail.com wrote: On 21.10.2012, at 0:59, Nikita inefe...@gmail.com wrote

[PHP-DEV] bug on bc math?

2012-07-30 Thread Devis Lucato
Hi, before raising a bug I was wondering if anyone noticed this odd behavior in BC math functions ? Actual php -r echo bcmul('1.1', '9.0', 5); == 9.90 php -r bcscale(5); echo bcmul('1.1', '9.0'); == 9.90 php -r bcscale(5); echo bcadd('8.9', '1.0'); == 9.9 Expected php -r echo

Re: [PHP-DEV] Re: [PHP-QA] Parallel run-tests

2012-05-21 Thread Devis Lucato
argument supplied for foreach() in phpruntests/src/testrun/rtPhpTestRun.php on line 107 PHP Notice: Undefined offset: 1 in phpruntests/src/testrun/rtPhpTestRun.php on line 107 Devis

Re: [PHP-DEV] Implicit Reference

2012-05-10 Thread Devis Lucato
Hi, I had a possible use case while working with an application registry. Any model could get a copy of it to read application settings or retrieve a resource. However if a model by mistake changed a property, it would modify the original object without going through proper setters... A quick

Re: [PHP-DEV] catching exception using a variable passed by reference

2012-05-06 Thread Devis Lucato
Hi Laruence, the solution you suggest would work though it makes it all a bit more verbose... I noticed also that the original variable is completely removed from the function scope, which is probably a bug. I'll raise a ticket, thank you ;-) Devis On 6 May 2012 05:04, Laruence larue

[PHP-DEV] catching exception using a variable passed by reference

2012-05-05 Thread Devis Lucato
Hi, I stumbled upon this code while working with a variable passed by reference, I was wondering if someone could provide some feedback before raising a ticket, just in case PHP (5.3.6) is doing what it's supposed to do. In the code below I would expect catch to change the variable as an

Re: [PHP-DEV] Shebang parsing

2012-01-26 Thread devis
as a *single* argument (which is what you are seeing). 4. Some even don't support shebang lines *at all*. Thankfully, 1. and 4. seem to have died out, but 3. is pretty widespread, so you simply cannot rely on being able to pass more than one argument. Devis 2012/1/26 Ferenc Kovacs tyr

Re: [PHP-DEV] Will apc.optimization ever be put back to APC?

2011-12-04 Thread devis
is complete. The first hit would use the non optimised code, an optimiser would run to produce optimised opcode and eventually update APC cache. Starting with the second hit (or later if the optimisation takes time) the request would hit the faster cached opcode. Devis On 4 December 2011 19:55, Tom

Re: [PHP-DEV] 5.4's New De-referencing plus assignment

2011-11-30 Thread devis
Hi, personally I would find the proposed syntax very useful, similarly to the following one that is already implemented: if ($value = foo()) return $value instead of $value = foo(); if ($value) return $value; Regards, Devis On 30 November 2011 19:13, Nikita Popov nikita@googlemail.com

Re: [PHP-DEV] 5.4's New De-referencing plus assignment

2011-11-30 Thread devis
You surely could add a factory to every class in your project, perhaps with a trait, but you wouldn't have it for core and third party classes. On 30 November 2011 19:59, Will Fitch will.fi...@gmail.com wrote: Again, back to my question of why not use: MyComponent::factory($bar, $option);

Re: [PHP-DEV] New dereferencing syntaxes in 5.4

2011-11-29 Thread devis
Hi, is the new dereferencing syntax definitely part of 5.4 ? Will it be possible to replace this: $model = new DomainModel('foo', 'bar'); $result = $model-findByName('John'); with: $result = (new DomainModel('foo', 'bar'))-findByName('John'); ? Thank you Devis On 21 November 2011 07:59

Re: [PHP-DEV] New dereferencing syntaxes in 5.4

2011-11-29 Thread devis
Hi Rasmus, I already tested a similar example (see http://codepad.viper-7.com/tNkTTX) but I'm getting *Parse error*: syntax error, unexpected '-' (T_OBJECT_OPERATOR) so my question... I thought this feature was part of 5.4 considering the previous messages, perhaps it is not. Devis On 30

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-24 Thread devis
'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) ### Is that correct saying that if the first condition is false the second will always be true ? Note: that's a piece of Wordpress Thank you Devis

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-24 Thread devis
Thanks Ferenc Everything looks ok http://codepad.viper-7.com/JTXsGK Devis On 24 November 2011 10:31, Ferenc Kovacs tyr...@gmail.com wrote: It gives me false in 5.3.6. Using it outside of isset() results in the fatal error. hm. tyrael@thor:~$ php -r '$string = foo;isset($string[foo

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-24 Thread devis
Would it be possible to have that check only if E_NOTICE is enabled ? That would allow to limit the cost to development environments (assuming one could disable E_NOTICEs on production env). Devis -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

Re: [PHP-DEV] Re: [php-maint] [PHP-DEV] PHP 5.3.9 and is_a changes

2011-10-24 Thread devis
Hi, I have always disliked the lack of modern packages on Debian/Ubuntu distros, I feel like minor are misused as major versions, with an exaggerated fear to upgrade. It's like building web sites for IE6 because people are not allowed to upgrade to IE9, very frustrating for developers and hard to

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-19 Thread devis
of its strong points, and since we don't have method overloading, limiting the signature extension or contraction doesn't sound very useful to developers. bye! Devis On 19 September 2011 16:53, Ferenc Kovacs tyr...@gmail.com wrote: First of all, Anthony, thanks for joining into the discussion

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-17 Thread devis
() The example with __construct() is valid (at least in 5.3). Devis On 17 September 2011 14:43, Nikita Popov nikita@googlemail.com wrote: Hi Richard! Which change are you talking about? I just tried doing: ?php class A { public function __construct($a) { } } class B

Re: [PHP-DEV] html_errors default settings

2011-06-24 Thread devis
I found these The error handling output was found to not properly escape HTML output in certain cases. An attacker could use this flaw to perform cross-site scripting attacks against sites where both display_errors and html_errors are enabled.