Re: [PHP-DEV] Using call_user_function with closures

2010-05-19 Thread spam
On Wed, May 19, 2010 10:48 pm, Alec wrote: > I am taking over an extension from one of my coworkers, and it was > written before the time of PHP 5.3. Are there any special considerations to > think about when using closures with call_user_function? This is the > current line: > > if (call_user_func

[PHP-DEV] Using call_user_function with closures

2010-05-19 Thread Alec
I am taking over an extension from one of my coworkers, and it was written before the time of PHP 5.3. Are there any special considerations to think about when using closures with call_user_function? This is the current line: if (call_user_function(EG(function_table), NULL, &callback, &local_

Re: [PHP-DEV] SVN Account Request: ssufficool

2010-05-19 Thread Johannes Schlüter
On Sat, 2010-05-15 at 09:38 -0700, Stanley Sufficool wrote: > Maintaining the PDO DBLIB driver and creating new PDO drivers. > the account was granted. I gave you karma to pdo_dblib and the NEWS file. In case you have any questions, uncertainties, ... please speak up. New drivers would usually "g

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Alban LEROUX
On 2010-05-19 14:04:13 +0200, Ferenc Kovacs said: On Wed, May 19, 2010 at 1:49 PM, Christian Schneider wrote: fqqdk wrote: How about extending the usage of the 'final' keyword to support a java-like syntax? class Foo { private static final $bar = 'ex' . 'pression'; In my book "final" in

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Tjerk Anne Meesters
On Wed, May 19, 2010 at 7:04 PM, Richard Quadling wrote: > On 19 May 2010 11:21, Tjerk Anne Meesters wrote: >> On Wed, May 19, 2010 at 5:52 PM, Frederic Hardy >> wrote: >>> Hello ! AFAIK class constants are optimized for speed and therefore don't support expressions; don't expect

Re: [PHP-DEV] Interface and abstract method

2010-05-19 Thread Richard Quadling
On 19 May 2010 13:53, Peter Cowburn wrote: > I think the key issue is that _in the docs_ some interface methods are > marked up as abstract, yet others aren't.  I suggest making them > consistent, having them all being one or t'other. I would show abstract. -- - Richard Quadling "Standing

Re: [PHP-DEV] Interface and abstract method

2010-05-19 Thread Peter Cowburn
On 19 May 2010 13:31, Richard Quadling wrote: > On 19 May 2010 13:27, mathieu.suen wrote: >> Ok so there is no real meaning behind the "abstract". >> Thanks >> >> On 05/18/2010 05:55 PM, Tjerk Anne Meesters wrote: >>> >>> Normally, PHP won't allow access types for interface methods, but the >>> r

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Johannes Schlüter
Hi, On Wed, 2010-05-19 at 13:03 +0200, fqqdk wrote: > 2010/5/19 Tjerk Anne Meesters > > I wrote a small article that gives an idea of the speed differences: > > http://shwup.blogspot.com/2010/04/about-constants.html Unfortunately this doesn't tell, what you actually measured. And note that as of

Re: [PHP-DEV] Interface and abstract method

2010-05-19 Thread Richard Quadling
On 19 May 2010 13:27, mathieu.suen wrote: > Ok so there is no real meaning behind the "abstract". > Thanks > > On 05/18/2010 05:55 PM, Tjerk Anne Meesters wrote: >> >> Normally, PHP won't allow access types for interface methods, but the >> reflection for SPL is defined inside the C code: >> >> st

Re: [PHP-DEV] Interface and abstract method

2010-05-19 Thread mathieu.suen
Ok so there is no real meaning behind the "abstract". Thanks On 05/18/2010 05:55 PM, Tjerk Anne Meesters wrote: Normally, PHP won't allow access types for interface methods, but the reflection for SPL is defined inside the C code: static const zend_function_entry spl_funcs_OuterIterator[] = {

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Ferenc Kovacs
On Wed, May 19, 2010 at 1:49 PM, Christian Schneider wrote: > fqqdk wrote: > > How about extending the usage of the 'final' keyword to support a > java-like > > syntax? > > > > class Foo { > >private static final $bar = 'ex' . 'pression'; > > In my book "final" in Java gets an award for sickes

Re: [PHP-DEV] [SUGGEST] - passthru

2010-05-19 Thread Mathias Grimm
On Wed, May 19, 2010 at 8:43 AM, Christian Schneider wrote: > If you want to have multiple dynamic arguments to pass on like this I'd > suggest you use one associative array as parameter instead. > > Like >function a($p = array()) { ... } >function aa($p = array()) { a($p); } >

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Christian Schneider
fqqdk wrote: > How about extending the usage of the 'final' keyword to support a java-like > syntax? > > class Foo { >private static final $bar = 'ex' . 'pression'; In my book "final" in Java gets an award for sickest abuse of a keyword. So no, I don't consider this an option. Simply use a cl

Re: [PHP-DEV] [SUGGEST] - passthru

2010-05-19 Thread Christian Schneider
Mathias Grimm wrote: > call_user_func_array('a',func_get_args());// a(pervade(); Two things: a) There is a way of doing it and although it is a bit cryptic I find it appropriate since I don't consider this something which should be done in regular code. b) pervade() could not be a normal functio

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Richard Quadling
On 19 May 2010 11:21, Tjerk Anne Meesters wrote: > On Wed, May 19, 2010 at 5:52 PM, Frederic Hardy > wrote: >> Hello ! >>> >>> AFAIK class constants are optimized for speed and therefore don't >>> support expressions; don't expect this to change any time soon ;-) >>> Is there any feature req

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread fqqdk
2010/5/19 Tjerk Anne Meesters > On Wed, May 19, 2010 at 5:52 PM, Frederic Hardy > wrote: > > Hello ! > >> > >> AFAIK class constants are optimized for speed and therefore don't > >> support expressions; don't expect this to change any time soon ;-) > >> > >>> Is there any feature request about c

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Tjerk Anne Meesters
On Wed, May 19, 2010 at 5:52 PM, Frederic Hardy wrote: > Hello ! >> >> AFAIK class constants are optimized for speed and therefore don't >> support expressions; don't expect this to change any time soon ;-) >> >>> Is there any feature request about constant and expression ? >>> I would like to wri

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Frederic Hardy
Hello ! AFAIK class constants are optimized for speed and therefore don't support expressions; don't expect this to change any time soon ;-) Is there any feature request about constant and expression ? I would like to write something like that : So the best solution is something like define('

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Pierre Joye
hi, On Wed, May 19, 2010 at 11:03 AM, Tjerk Anne Meesters wrote: > AFAIK class constants are optimized for speed and therefore don't > support expressions; don't expect this to change any time soon ;-) It would require to do a two passes compilation (or something along this line) as you can defi

Re: [PHP-DEV] Constant and expression ?

2010-05-19 Thread Tjerk Anne Meesters
AFAIK class constants are optimized for speed and therefore don't support expressions; don't expect this to change any time soon ;-) On Wed, May 19, 2010 at 4:54 PM, Frederic Hardy wrote: > Hello ! > > Is there any feature request about constant and expression ? > I would like to write something

[PHP-DEV] Constant and expression ?

2010-05-19 Thread Frederic Hardy
Hello ! Is there any feature request about constant and expression ? I would like to write something like that : Best regards, Fred. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php